wMin Property (Specific to iOS Slider Controls)

Applies to TestComplete 15.62, last modified on March 19, 2024
This property is available in legacy mobile tests that work with devices connected to the local computer. To learn how to simulate user actions in newer cloud-compatible mobile tests, see the Simulating user actions in tests section.

Description

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

Declaration

TestObj.wMin

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 minimum 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 (Legacy)
wMax Property (Specific to iOS Slider Controls)
wPosition Property (Specific to iOS Slider Controls)

Highlight search results