wMaxY Property (iOS Controls)

Applies to TestComplete 15.70, last modified on December 17, 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

A control's two-dimensional logical position is specified by horizontal and vertical offsets, which can be set within a defined range. Use the wMaxY property to get the maximum vertical position of the control.

Declaration

TestObj.wMaxY

Read-Only Property Integer
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 objects:

View Mode

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

Property Value

An integer value that specifies the maximum vertical position of the slider.

Remarks

If the control has only horizontal scrolling, the property always returns 0.

Example

JavaScript, JScript

function Test()
{
  // Select the mobile device
  Mobile.SetCurrent("iPhone");
  // Obtain the ScrollView object
  var p = Mobile.Device().Process("SampleApp");
  var scrollview = p.Window().ScrollView();
  
  Log.Message(scrollview.wMaxX);
  Log.Message(scrollview.wMaxY);
  Log.Message(scrollview.wMinX);
  Log.Message(scrollview.wMinY);
}

Python

def Test():
  # Select the mobile device
  Mobile.SetCurrent("iPhone")
  # Obtain the ScrollView object 
  p = Mobile.Device().Process("SampleApp")
  scrollview = p.Window().ScrollView()
  
  Log.Message(scrollview.wMaxX)
  Log.Message(scrollview.wMaxY)
  Log.Message(scrollview.wMinX)
  Log.Message(scrollview.wMinY)

VBScript

Sub Test()
  Dim p, scrollview
  ' Select the mobile device
  Mobile.SetCurrent("iPhone")
  ' Obtain the ScrollView object
  Set p = Mobile.Device.Process("SampleApp")
  Set scrollview = p.Window.ScrollView
  
  Log.Message(scrollview.wMaxX)
  Log.Message(scrollview.wMaxY)
  Log.Message(scrollview.wMinX)
  Log.Message(scrollview.wMinY)
End Sub

DelphiScript

procedure Test();
var
  p, scrollview;
begin
  // Select the mobile device
  Mobile.SetCurrent('iPhone');
  // Obtain the ScrollView object
  p := Mobile.Device.Process('SampleApp');
  scrollview := p.Window.ScrollView;
  
  Log.Message(scrollview.wMaxX);
  Log.Message(scrollview.wMaxY);
  Log.Message(scrollview.wMinX);
  Log.Message(scrollview.wMinY);
end;

C++Script, C#Script

function Test()
{
  // Select the mobile device
  Mobile["SetCurrent"]("iPhone");
  // Obtain the ScrollView object
  var p = Mobile["Device"].Process("SampleApp");
  var scrollview = p["Window"]()["ScrollView"]();
  
  Log["Message"](scrollview["wMaxX"]);
  Log["Message"](scrollview["wMaxY"]);
  Log["Message"](scrollview["wMinX"]);
  Log["Message"](scrollview["wMinY"]);
}

See Also

Checking ScrollView's Position Range
Scrolling Table View
Working With Multiline Edit Controls
wMaxX Property (iOS Controls)
wPositionX Property (iOS Controls)
wPositionY Property (iOS Controls)
iOS ScrollView Support

Highlight search results