-
Notifications
You must be signed in to change notification settings - Fork 16
How to setup models for UI and Service test
David_Chau edited this page Jan 31, 2019
·
12 revisions
This section shows examples of how to specify page element and a location value. Web driver interacts with the page based on how we define our model objects. The codeless framework creates page object model for each ui model files under test. This model files need to have a correct yaml structure as shown below.
example:
username:
by: "name"
locator: "username"
login:
by: "xpath"
locator: "/html/body/app-root/app-login/div/div/div[1]/form/div[11]/div/button"
blank:
by: "css"
locator: "input[value='TEST']"
browse:
by: "classname"
locator: "btn-primary"
slack:
by: "name"
locator: "slackNotification"
button:
by: "id"
locator: "searchbutton"
register:
by: "linktext"
locator: "registerButton"
createAccount:
by: "partiallinktext"
locator: "create"
save your model files as yaml in models folder of skeleton project with above format. refer to the element you want to interact within your test case steps, in the Target column. For example, when attempting to refer to the browse element defined above, and assuming this file had the directory of example/examplepage.yml inside the models folder, the Target column in the test sheet would contain: example.examplepage.browse