"CLICK" Command

Description: This command clicks on a web element or a widget defined by a locator or inline XPath.

Usage Scenario: Suppose we want to click the Login link on our Reference app

Procedure: Define a locator with reference name “subject7_reference_login.link.login where the HTML tag is:

<a href="/#/login">LOGIN</a>

and the XPath is:

//a[contains(text(),'LOGIN')]

Alternatively, you can enable Inline XPath checkbox and paste the XPath in your step. If you are planning on using this XPath in other test cases, you can create a web locator.

In your step, select Click command and select the locator. Your step will look like this:

Web Locator:

image-20240223-120226.png

Inline XPath:

image-20240223-120252.png

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The video following video demonstrates how the “Login” link and button are clicked as part of execution of “subject7_website_login_logout” test case in “subject7_samples” folder:

Reference App