Webpage.Element.Find command

Uses an element identifier (HTML attribute value or XPath) to search for the element in the display of the active window. Assumes that the display is using DOM elements. Can be used to validate whether an element exists on the webpage.

The returnValue of the response provides the element tree traversal to the element if found.

Parameters

Name Type Possible values Description

Device ID*

Device

 

The device for this command. By default, this is the device under test (DUT).

Element identifier*

String

 

The object identifier. By default, Object Spy generates an Xpath.

To specify another identification method, you can use the By parameter.

By

String

XPath | CSS Selector | HTML id | HTML name | | HTML class | HTML tag | Text | Partial text

The identification method.

Timeout

Number

 

The time, in seconds, to wait for the element to appear on the screen or the web page.

Result data table

DataTable

 

The datatable to which the results of the find will be added. The datatable can be used with other functions. It should have a single column of type STRING.

Webview index

Number

 

The index number of the web view in a hybrid application.

Scope

Number

 

A list of XPath expressions representing the iFrames/Frames leading to the element.

Page load timeout

String

 

The time, in seconds, to wait for the application screen or the web page to be loaded.

Report

String

Screenshot | Screenshot on error | None

The value to display in the report, where:

  • Screenshot displays a screenshot for each action

  • Screenshot on error displays screenshots only for actions in error

  • None does not display any screenshots

Consider reducing the resolution in very long scripts that result in large report files.

Report image resolution

String

High | Medium | Low

The image resolution.

Consider reducing the resolution in very long scripts that result in large report files.

Comment

String

 

Adds a comment to the script

On-fail Result*

Condition

Ignore | Break | Continue | Abort | Catch

The behavior when the command fails.

* Mandatory parameter