Keyboard and Mouse Actions tasks include the following:
doubleClick(<locator>);
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the element on which you want to perform the double-click action. Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
ui.zwatch.GMT-product-image | STRING | The recorded element of the required product image. |
rightClick(<locator>);
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the element on which you want to perform the right-click action.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
where:
ui.zwatch.product-menu | The recorded element to access the context menu of a product. |
sendKeys(<locator>, <keys>);
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the element that should receive the keyboard input.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
<keys> | ARRAYLIST | The task involves specifying an array list containing a sequence of keyboard keys that you want to send to the web element.
Possible values: Sequence of characters and special keys such as ADD, ALT, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, BACK_SPACE, CANCEL, CLEAR, COMMAND, CONTROL, DECIMAL, DELETE, DIVIDE, DOWN, END, ENTER, EQUALS, ESCAPE, HELP, HOME, INSERT, LEFT, LEFT_ALT, LEFT_SHIFT, META, MULTIPLY, NULL, PAGE_DOWN, PAGE_UP, PAUSE, RETURN, RIGHT, SEMICOLON, SEPARATOR, SHIFT, SPACE, SUBTRACT, TAB, UP. Note:
|
where:
ui.zwatch.username-field | The recorded element of the username field in the login form. |
["Sharon Morgan",keys.TAB,"Sharon@zylker",keys.ENTER] | The array of keys is sent to fill the username field, then move to the password field and finally submit the form. |
hover(<locator>);
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the element to be hovered on.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
where:
ui.zwatch.premium-account | The recorded element to access the navigational link for "Premium Accounts". |
hoverAndClick(<locator>);
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the element that you want to hover the mouse cursor over, then click.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
Parameter | Data Type | Description |
<hover_locator> | STRING | Address to locate the element that you want to hover the mouse cursor over.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
<click_locator> | STRING | Address to locate the element on which you want to perform a click action after hovering.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
where:
ui.zwatch.premium-account | The recorded element to access the navigational link for "Premium Accounts". |
where:
ui.zwatch.influencer-club | The stored element to access the navigational link for "Influencers Club". |
ui.zwatch.join-button | The stored element of the "Join Now" button inside the preview of the club benefits. |
Using the element locators, it automates scrolls to a particular element within a webpage, ensuring it comes into view.
By specifying "X-axis" and "Y-axis" coordinates, it offers precision in scrolling to exact positions on the page.
By specifying positions (Top, Left, Right, and Bottom), it allows flexible scrolling to different parts of the webpage.
By specifying the position along with the locator, it automates scroll for a scrollable element of the webpage.
scrollTo(<scroll_input>);
Parameter | Data Type | Description |
<scroll_input> | STRING | This input determines how the scroll behaves on the webpage.
The following are the three distinct ways to configure the scroll input:
locator: Address to locate the element that you want to scroll to.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more.COORDINATES: The horizontal (X-axis) and the vertical (Y-axis) coordinates to which you want to scroll. The X coordinate represents the left-to-right positioning on the webpage. The Y coordinate represents the top-to-bottom positioning on the webpage. It is typically measured in pixels.
position.BOTTOM: Scrolls to the bottom of the webpage. position.CENTER: Scrolls to the center of the webpage. position.LEFT: Scrolls to the leftmost part of the webpage. position.RIGHT: Scrolls to the rightmost part of the webpage. position.TOP: Scrolls to the top of the webpage.
In order to scroll to a specified element, use ("locator"), to scroll to an element using their coordinates, use ("x:<point>, y:<point>") or to scroll to a particular position on a webpage, use (<position>). |
Parameter | Data Type | Description |
<locator> | STRING | Address to locate the scrollable element on the webpage.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
<position> | STRING | The four scroll positions:
|
where:
ui.zwatch.GMT-product-card | The recorded element for the product card. |
"x:66,y:976" | The "x" and "y" coordinates for the promotional banner. |
position.BOTTOM | To scroll to the end of the product listing, which is present at the bottom part of the webpage. |
ui.zwatch.product-review | The recorded element to navigate to the product review section on the website. |
position.TOP | To scroll the reviews to the top of the scrollable area. |
Parameter | Data Type | Description |
<from_locator> | STRING | Address to locate the element to be dragged.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more. |
<to_locator> | STRING | Address to locate the element or the coordinates within the webpage in which it'll be dropped.
Note: The value to this parameter can either be supplied with recorded locators stored as elements or hard coded with the necessary locators in the format "<locator>". Learn more.Alternatively, it can take the horizontal (X-axis) and the vertical (Y-axis) coordinates. The X coordinate represents the left-to-right positioning on the webpage. The Y coordinate represents the top-to-bottom positioning on the webpage. Coordinates can be used in the format, ("x:<point>, y:<point>"). |
<seconds> | LONG | The time duration set to account for the delay when dragging an element from one location and dropping it to another. It is measured in seconds.
Note: The time duration must be less than 10 seconds. |
where:
ui.zwatch.Dayton | The recorded element to locate the product in the website. |
ui.zwatch.cart | The recorded element of the cart in the website. |
10 | The time the task has to wait for the product to be dragged and dropped into the cart. |