One of the most common sources of brittleness in test automation is the lack of synchronization on events happening on the browser. Test logic must wait to ensure browser has loaded necessary components before proceeding with the logic execution.
accelQ promotes effective synchronization in multiple ways.
Synchronization at Context level
Users can setup a standard synch element or page-based synch at the Context definition level. This is an implicit synchronization which is automatically invoked before any Action in the given Context is executed. More details here
Functional Waits
In addition, following commands can be used to setup explicit synch points in Action logic. For each of the commands, you can specify the maximum timeout value in seconds. It is advisable to insert one of these statements at the beginning of Action logic to ensure reliable execution.
Wait for Element | Waits for a given element to be displayed |
Wait Until Element Disappears | Waits for an element to disappear from screen |
Wait Until Element Enabled | Waits for an element to be enabled for interaction |
Wait Until Element Disabled | Waits for an element to be disabled |
Wait Until Element Property Equals | Waits until a given property has a given value |
Wait Until Element Property Not Equals | Waits until the property of element does not equal given value |
Wait Until CSS Equals | Waits for the element CSS property to achieve a given value |
Wait Until CSS Not Equals | Waits for the element CSS property to change and become not-equal to the given value |
Wait behavior of various commands
Across the system, following policy is used with regards to element waits for different commands. While executing these commands, if an element is not found or if it is loading slow:
- Verify commands such as Verify Element Exists - Timeout as specified in the Run modal.
- Inspection commands such as Is Element Exists - No timeout, immediate return.
- Wait commands such as Wait for Element - Timeout as specified in the wait command.
Comments
0 comments
Please sign in to leave a comment.