wWheelCount Property (Specific to iOS Picker View Controls)

Applies to TestComplete 14.72, last modified on January 20, 2021


Use the wWheelCount property to get the total number of wheels in the specified control.



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 object:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

The total number of wheels in the control.


You can use the wWheelCount, wItemCount and wItem properties to iterate through a control’s items.


The following example iterates through picker view wheels and posts the items to the log.

JavaScript, JScript

function Test()
  // Select the mobile device
  // Obtain the PickerView object
  var p = Mobile.Device().Process("SampleApp");
  var pickerview = p.Window(3).PickerView();
  for (var i=0; i<pickerview.wWheelCount; i++)
    for (var n=0; n<pickerview.wItemCount(i); n++)
      Log.Message(pickerview.wItem(n, i))


def Test():
  # Select the mobile device
  # Obtain the PickerView object 
  p = Mobile.Device().Process("SampleApp")
  pickerview = p.Window(3).PickerView()
  for i in range (0, pickerview.wWheelCount):
    for n in range (0, pickerview.wItemCount[i]):
        Log.Message(pickerview.wItem[n, i])


Sub Test()
  Dim p, pickerview
  ' Select the mobile device
  ' Obtain the PickerView object
  Set p = Mobile.Device.Process("SampleApp")
  Set pickerview = p.Window(3).PickerView
  For i = 0 To pickerview.wWheelCount-1
    For n = 0 To pickerview.wItemCount
      Log.Message(pickerview.wItem(n, i))
End Sub


procedure Test();
  p, pickerview, i, n;
  // Select the mobile device
  // Obtain the PickerView object
  p := Mobile.Device.Process('SampleApp');
  pickerview := p.Window(3).PickerView;
  for i := 0 to pickerview.wWheelCount-1 do
    for n := 0 to pickerview.wItemCount(i)-1 do
      Log.Message(pickerview.wItem(n, i))

C++Script, C#Script

function Test()
  // Select the mobile device
  // Obtain the PickerView object
  var p = Mobile["Device"].Process("SampleApp");
  var pickerview = p["Window"](3)["PickerView"]();
  for (var i=0; i<pickerview["wWheelCount"]; i++)
    for (var n=0; n<pickerview["wItemCount"](i); n++)
      Log["Message"](pickerview["wItem"](n, i))

See Also

Testing iOS Applications
Working With iOS Picker View Controls - Basic Concepts
wItem Property (iOS Picker View Controls)

Highlight search results