Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Description

This command will click an element. Although Appium provides a native click method, the SeeTest Client extends the click command by allowing you to specify how many clicks to perform. In addition, this command has the ability to click on elements based on OCR (optical character recognition).

Parameters

Name

Value

Description

zonestringZone - Native, Web, Text (OCR)
elemenstringxpath of the element to find. In case of Text (OCR), the element's text
indexintindex of the element to find, if more than one element answers to the xpath query
clickCountint

Number of clicks to perform

Usage

If your app includes a feature where an element or button need to be clicked more than once, you can use this command. You can also use this command to click on element that does not have a defined XPath and can only be recognized based text that appears in their image.


Example

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.

Usage of Click Command
driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc);
seetest = new SeeTestClient(driver);


...
...

// to click an native element in an app
seetest.click("NATIVE", "xpath=//*[@text='click me']", 0, 5);


// to click an element by OCR
seetest.click("TEXT", "click me, 0, 5);


  • No labels