Click
From STIQ
click ( locator )
Arguments:
- locator - an element locator
If the action will result in a new page loading, it is advisable to use clickAndWait.
Note:
- Selenium will automatically click on a popup dialog raised by the alert() or confirm() methods. The exception is those raised during “onload”. You must use verifyAlert / assertAlert or verifyConfirmation / assertConfirmation to tell STIQ that you expect the popup dialog.
- You may use chooseCancelOnNextConfirmation to click ‘cancel’ on the next confirmation dialog instead of clicking ‘OK’.
- HTML radio buttons are difficult to locate without an id element. Because the markup uses the name to identify all the buttons within a group of radio buttons, the id element is required to uniquely specify a button to click.
Examples:
- Entered in the Test pane as:
- | click | _ctl0_ContentBlock_LeftSideBar_btnLogin | |
- | clickAndWait | //input[@value='Find'] | |
- | clickAndWait | //a[text()='Manage'] | |
- Rendered in the Test pane as:
click _ctl0_ContentBlock_LeftSideBar_btnLogin 1
clickAndWait //input[@value='Find'] 1
clickAndWait //a[text()='Manage'] 1
