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 Web Element appear/enable | Waits for an element to reach a specific state, such as appear, disappear, enabled, or disabled. |
| Wait for Web Element property/text | Waits for an element’s property (text, HTML attribute, or CSS attribute) to reach the expected 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/Enabled - Timeout as specified in the Run modal.
- Inspection commands such as Is Web Element displayed/enabled - 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.