-
Notifications
You must be signed in to change notification settings - Fork 11
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: back
Refresh the page.
exec:
operate: refresh
Input the text.
Use page and part to specific the input element.
exec:
operate: input
page: page_name
part: part_name
word: Write something
Clear the text.
Use page and part to specific the input element.
exec:
operate: clear
page: page_name
part: part_name
Click 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_name
Note: 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_name
Choose 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: 0
By value:
exec:
operate: choose
page: page_name
part: part_name
value: value in tag
By text:
exec:
operate: choose
page: page_name
part: part_name
text: option text
Accept the alert in page.
exec:
operate: accept_alert
Switch to the next tab in browser.
exec:
operate: switch_to_next_window
Switch to the previous tab in browser.
exec:
operate: switch_to_previous_window
Switch to the newest tab in browser.
exec:
operate: switch_to_newest_window
Switch to the oldest tab in browser.
exec:
operate: switch_to_oldest_window
Switch to specific tab by name.
exec:
operate: switch_to_the_window
window_name: tab name
Close the current tab in browser.
exec:
operate: close
Add some wait times in the test.
Note: Wait times can only be set in second.
exec:
operate: wait
sec: 5
Add stop point in the test.
Note: Continue triggers by enter key.
exec:
operate: stop