Add 'jumpIf' and 'jumpIfNot' commands to README and executor; implement parsing, execution, and linter support for conditional command jumps in test scripts.
This commit is contained in:
14
README.md
14
README.md
@@ -103,6 +103,20 @@ sleep 2500 "waiting for animation"
|
||||
sleep 500 "let page settle"
|
||||
```
|
||||
|
||||
#### jumpIf
|
||||
Jump over a specified number of commands if an element exists:
|
||||
```
|
||||
jumpIf element=span childText="Server-Warenkorb" jump=4
|
||||
jumpIf element=div id="error-message" jump=2
|
||||
```
|
||||
|
||||
#### jumpIfNot
|
||||
Jump over a specified number of commands if an element doesn't exist:
|
||||
```
|
||||
jumpIfNot element=span childText="Server-Warenkorb" jump=4
|
||||
jumpIfNot element=div id="success-message" jump=2
|
||||
```
|
||||
|
||||
### Element Selectors
|
||||
|
||||
You can combine multiple attributes:
|
||||
|
||||
Reference in New Issue
Block a user