Skip to main content

GUI: JS Events

Description

GUI: JS Events step performs the JS events

Note
  • Dispatching an event using JS Events, for example, click, keydown and so on, the event only triggers a response if the target element has a corresponding event handler such as an event listener or supports a default browser action for that event.
  • If no handler is defined and there is no native behavior associated with the event type, the event will be dispatched but no action will be performed.

Configurations

No.Field NameDescription
1Step nameName of the step. The name must be unique in a single workflow.
The data type is string and the field is mandatory.
2Web Browser NameSelect any one Web Browser Name from the given list.
Note: Select the same web browser name which was selected in Start Browser Step.
3CriteriaCriteria is the criterion to locate elements on Web GUI.
GUI Spy can capture the element in the Generate Step dialog. Upon Step Generation, it is populated in the step configuration. You may change criteria by choosing from the list in the Step Generation window or step configuration.
Note: For list and description of criteria values, See Criteria Table.
The field is mandatory.
4Criteria ValueSpecify relevant criteria value for the selected criteria above.
5Element Index (Starts with 0)Specify the index of the element you want to locate.
Note: One can also specify First or Last.
First, if you want the first element from the located element or, specify Last if you want the last element.
Default Value: 0
6Iframe IndicesSpecify Iframe Indices value.
Iframe indices ensure that the target element is identified correctly within the nested frame structure.
You can specify comma-separated values, for example, 0,1,2.
7Iframe XpathIframe Xpath is a uniquely generated path that represents the location of an <iframe> or <frame> relative to the top-level window.
Iframe Xpath identifies each frame using a unique attribute such as id, name, or title if available, for example, iframe[@id='mainFrame'].
If no such attributes exist, the frame is identified by its position among sibling frames, like iframe[2] for the second iframe.
For nested structures, each frame is joined in sequence to form a full path. For example, if an element is inside an iframe[@id='outer'], which contains a frameset with a frame[@name='middle'], and that frame contains iframe[@title='inner'], the generated path would be:
iframe[@id='outer'];frame[@name='middle'];iframe[@title='inner'].
Note: If an iframe or frame has no id, name, or title, its origin (i.e., the src URL) will be used as a fallback in the path for unique identification. For example: iframe[@origin='https://example.com']
8Frame IDProvide the current Iframe Id to target a specific iframe to perform the action.
Default Value: frameID
9ActionSelect the action to perform the event.
Available options are:
- Mouse Events
- Keyboard Events
- Form Events
10Action TypeSelect the event to perform on element.
Action Types are different according to the selected action above.
Action types for selected events are: For Mouse Events:
- click
- dblclick
- mouseover
- mouseup
- mousedown
- mousemove
For Keyboard Events:
- Keypress
- Keyup
- Keydown
For Form Events:
- focus
- blur
- change
- input
- submit
11BubblesIndicates whether the event propagates upward through the DOM hierarchy from the target element to its root element.
Bubbles: pass true if checked and false if unchecked.
12CancelableCancelable indicates if the event’s default browser behaviour can be prevented.
Use stopPropagation() to stop the event from going to parent elements.
Use preventDefault() to block the default action, but only if the event is cancelable.
13ButtonIndicates which mouse button was pressed to trigger the event.
For example:
0 = Left button
1 = Middle button (wheel)
2 = Right button
Note: Field is only applicable if the selected Action is Mouse Events and Action type is click, dblclick, mouseup, mousedown.
14ButtonsIndicates which combination of mouse buttons are currently being pressed when the event occurs.
It uses a number that represents a combination of buttons:
1 = Left button
2 = Right button
4 = Middle button
Values can be added together for multiple buttons (e.g., 3 means left + right).
Note: Field is only applicable if the selected Action is Mouse Events and action type is click, dblclick, mouseup, mousedown.
15KeyRepresents the specific key that was pressed during the event.
Examples:
"Enter" for the Enter key,
"A" for the letter A, "ArrowUp" for the up arrow key
Notes:
- You can provide multiple keys by separating them with commas. For example: Enter, a, b
- This field is only applicable if the selected action is Keyboard Events.
16KeysRepresents a combination of keys that are pressed at the same time.
Allowed values are:
- ctrlKey – Indicates whether the Control (Ctrl) key was held down during the key press.
- shiftKey – Indicates whether the Shift key was held down during the key press.
- altKey – Indicates whether the Alt key (Option key on Mac) was held down during the key press.
- metaKey – Indicates whether the Meta key was held down — this is usually the Windows key on Windows or the Command key on macOS.
Note: This field is only applicable if the selected action is Keyboard Events.
17X-CoordinateSpecify the horizontal position to move the mouse on the element.
18Y-CoordinateSpecify the Vertical position to move the mouse on the element.