wMax Property (Specific to iOS Slider Controls)

Applies to TestComplete 14.72, last modified on December 24, 2020

Description

The position of the slider take on values from the defined range. The wMax property returns the maximum value of this range. This value should be greater than wMin.

Declaration

TestObj.wMax

Read-Only Property Double
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

A float value specifying the maximum position of the slider.

Example

The example below obtains the wMin and wMax values and posts them to the log.

JavaScript, JScript

function Test()
{

  // Select the mobile device
  Mobile.SetCurrent("iPhone");

  // Obtain the slider object
  var p = Mobile.Device().Process("SampleApp");
  var slider = p.Window().TableView().TableViewCell(2).ScrollView().Slider();

  // Get the slider's minimum and maximum positions
  var minPosition = slider.wMin;
  var maxPosition = slider.wMax;

  // Post the minimun and maximum positions to the log
  Log.Message(minPosition);
  Log.Message(maxPosition);

}

Python

def Test():

  # Select the mobile device
  Mobile.SetCurrent("iPhone")

  # Obtain the slider object
  p = Mobile.Device().Process("SampleApp")
  slider = p.Window().TableView().TableViewCell(2).ScrollView().Slider()

  # Get the slider's minimum and maximum positions
  minPosition = slider.wMin
  maxPosition = slider.wMax

  # Post the minimun and maximum positions to the log
  Log.Message(minPosition)
  Log.Message(maxPosition)

VBScript

Sub Test

  ' Select the mobile device
  Mobile.SetCurrent("iPhone")

  ' Obtain the slider object
  Set p = Mobile.Device.Process("SampleApp")
  Set slider = p.Window.TableView.TableViewCell(2).ScrollView.Slider

  ' Get the slider's minimum and maximum positions
  minPosition = slider.wMin
  maxPosition = slider.wMax

  ' Post the minimun and maximum positions to the log
  Log.Message minPosition
  Log.Message maxPosition

End Sub

DelphiScript

procedure Test();
var p, slider, minPosition, maxPosition;
begin

  // Select the mobile device
  Mobile.SetCurrent('iPhone');

  // Obtain the slider's object
  p := Mobile.Device.Process('SampleApp');
  slider := p.Window().TableView().TableViewCell(2).ScrollView().Slider();

  // Get the slider's minimum and maximum positions
  minPosition := slider.wMin;
  maxPosition := slider.wMax;

  // Post the minimun and maximum positions to the log
  Log.Message(minPosition);
  Log.Message(maxPosition);

end;

C++Script, C#Script

function Test()
{

  // Select the mobile device
  Mobile["SetCurrent"]("iPhone");

  // Obtain the slider object
  var p = Mobile["Device"]["Process"]("SampleApp");
  var slider = p["Window"]()["TableView"]()["TableViewCell"](2)["ScrollView"]()["Slider"]();

  // Get the slider's minimum and maximum positions
  var minPosition = slider["wMin"];
  var maxPosition = slider["wMax"];

  // Post the minimun and maximum positions to the log
  Log["Message"](minPosition);
  Log["Message"](maxPosition);

}

See Also

Determining Minimum and Maximum Slider Positions
Testing iOS Applications
wMin Property (Specific to iOS Slider Controls)
wPosition Property (Specific to iOS Slider Controls)

Highlight search results