-
Notifications
You must be signed in to change notification settings - Fork 0
Pages
Julien Gidel edited this page Mar 22, 2021
·
1 revision
Pages are the possibility to store every path to UI elements to reuse them in your scenario.
In your page directory, create a folder named 'wikipedia' and create a new yaml file 'index.yaml'. This yaml file represents a page.
Now you can define your elements :
wikipedia: #This parent node is important
search-bar:
id: search
search-icon:
id: search-icon
body:
css: bodyNow that your page is created, you can use it in your scenario. You first need to load the page then use pageElement instead of id or xpath :
browser: chrome
scenario:
steps:
- go: http://wikipedia.fr
- print: This scenario use a page
- page: wikipedia.index #Load the page
- fill:
pageElement: search-bar #Use the element defined in wikipedia/index.yaml file
with: 'PHP'If your page isn't loaded, you will not be able to use the element and AutoMate will return an exception.
AutoMate Wiki - v0.8.0 - This wiki can change at any moment