void clickIn (zone, searchElement, index, direction, clickElementZone, clickElement, clickElementIndex, width, height, clickCount)
|
|
|
|
|
|
|
Search for an element and click on another element in reference to it.
Zone: Select Zone
Element: Select Element
Index: Selected Element index
Direction: Direction to analyze - DOWN, UP, LEFT, RIGHT, INSIDE
ClickElementZone: Select the Zone for the Element to click
ClickElement: Select the Element to click
clickElementIndex: Selected element to click index
Width: Width of the search in pixels ("0" indicating until the end/start of the window)
Height: Height of the search in pixels ("0" indicating until the end/start of the window)
clickCount: Number of clicks
When cannot identify the element to click directly, you can use another element as a reference.
Scenario: In the following example we will click the switch next to the "Bluetooth" label.
Parameters:
Zone: set to be "NATIVE"
SearchElement: set to "xpath=//*[@text='Bluetooth']"
Index: set to "0"
Direction: set to "Right"
ClickElementZone: set to "NATIVE"
ClickElement: set to "xpath=//*[@class='android.widget.Switch']"
ClickElementIndex: set to "0"
Width: set to "0"
Height: set to "0"
ClickCount: set to “1”
Result:
Value of the switch is now on.
client.clickIn("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);client.ClickIn("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);client.ClickIn "NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1Reportself.client.clickIn3("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1)$client->clickIn3("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);