注:指定严格按照分支出现的顺序执行代码(多个分支会变成一个分支),默认情况下多分支执行是按照优先级执行的
Sequential test .. // flatten branches at or below me into one sequential branch
One
Two
Three
Four
Five
// produces 1 branch:
// 1) sequential test, one, two, three, four, five
Nav to '/page' ..
Type '1111' into 'textbox'
Type '2222' into 'textbox'
Type '3333' into 'textbox'
Verify success
// produces 1 branch:
// 1) nav, type 1111, verify success, type 2222, verify success, type 3333, verify success
* Type in
Type '1111' into 'textbox'
Type '2222' into 'textbox'
Type '3333' into 'textbox'
Nav to '/page' ..
Type in
Verify success
// produces 1 branch:
// 1) nav, type 1111, verify success, type 2222, verify success, type 3333, verify success
Nav to '/page'
Type in .. // all we did was move the .. down one line
Verify success
// produces the same branch as before
* Open cart .. // the 3 steps here execute sequentially
Nav to '/'
Click 'cart icon'
Verify 'cart' is visible
Open cart // it's sequential inside, but not sequential out here
Do stuff
Do more stuff
// produces 1 branch:
// 1) open cart (nav to /, click cart icon, verify cart), do stuff, do more stuf
Nav to '/page'
.. // makes the whole step block run sequentially
Type '1111' into 'textbox'
Type '2222' into 'textbox'
Type '3333' into 'textbox'
Verify success
// produces 1 branch:
// 1) nav, type 1111, type 2222, type 3333, verify success
// Note: Acts differently from function calls under a .. step.
// If a function call has multiple branches, multiple branches will be generated:
* Go to cart
// two different ways of getting to the cart
Nav to '/cart'
Click 'cart icon'
..
Go to cart
Add peanuts to cart
Verify peanuts added
// produces branches:
// 1) nav to /cart, add peanuts, verify peanuts
// 2) click cart icon, add peanuts, verify peanuts