-
Notifications
You must be signed in to change notification settings - Fork 13
User Operation
This page provides the usage information for the user operation which can be used in the YAML test code's key. "exec" .
- go
- back
- refresh
- input
- clear
- click
- choose
- accept_alert
- switch_to_next_window
- switch_to_previous_window
- switch_to_newest_window
- switch_to_oldest_window
- switch_to_the_window
- close
- wait
- stop
Access the url.
exec:
operate: go
url: https://github.com/Go back the last page.
exec:
operate: backRefresh the page.
exec:
operate: refreshInput the text.
Use page and part to specific the input element.
exec:
operate: input
page: page_name
part: part_name
word: Write somethingClear the text.
Use page and part to specific the input element.
exec:
operate: clear
page: page_name
part: part_nameClick the element.
Use page and part to specific the element.
Note: The element should be clickable, or it will get an error.
exec:
operate: click
page: page_name
part: part_nameNote: Use num and locate to choose in multiple elements.
exec:
operate: click
page: page_name
part:
num: 0 # The number start from 0
locate: part_nameChoose the option in select element.
Use page and part to specific the select element.
Note: The option can be chosen by three ways: index, value or text.
By index:
Note: Index is start by 0.
exec:
operate: choose
page: page_name
part: part_name
index: 0By value:
exec:
operate: choose
page: page_name
part: part_name
value: value in tagBy text:
exec:
operate: choose
page: page_name
part: part_name
text: option textAccept the alert in page.
exec:
operate: accept_alertSwitch to the next tab in browser.
exec:
operate: switch_to_next_windowSwitch to the previous tab in browser.
exec:
operate: switch_to_previous_windowSwitch to the newest tab in browser.
exec:
operate: switch_to_newest_windowSwitch to the oldest tab in browser.
exec:
operate: switch_to_oldest_windowSwitch to specific tab by name.
exec:
operate: switch_to_the_window
window_name: tab nameClose the current tab in browser.
exec:
operate: closeAdd some wait times in the test.
Note: Wait times can only be set in second.
exec:
operate: wait
sec: 5Add stop point in the test.
Note: Continue triggers by enter key.
exec:
operate: stop