SeeTest Client - ClickIn
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
void clickIn (zone, searchElement, index, direction, clickElementZone, clickElement, clickElementIndex, width, height, clickCount)
Not supported on iOS Simulators.
Description
Search for an element and click on another element in reference to it.
Parameters
- 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
Usage
When you 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.
Code Examples
Java Example
client.clickIn("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);
C# Example Expand source
client.ClickIn("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);
VBScript Example Expand source
client.ClickIn "NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1
Report
Python Example Expand source
self.client.clickIn3("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1)
Perl Example Expand source
$client->clickIn3("NATIVE", "xpath=//*[@text='Bluetooth']", 0, "Right", "NATIVE", "xpath=//*[@class='android.widget.Switch']", 0, 0, 0, 1);