-
Notifications
You must be signed in to change notification settings - Fork 23
How to create an object repository
Mayank Gupta edited this page Jun 15, 2017
·
6 revisions
Object repository is the place from where Optimus finds the elements and performs the action on these elements according to the test.
- Under the resources folder of your project, create a new folder and name it elements.
- You can either choose to group your object repositories according to the screen or you could directly store
them with the file name same as the activity name in the case of Android. - For locating the elements via Appium Inspector, please follow these steps.
- After successfully locating the elements, store them in the object repository as shown above.
As you can see in the above image, the elements are stored in an object, to be specific, a JSON object.You have to specify the app name that is under test.Inside elements array, you need to store the name of the element, the identifier(xpath,id or class), the value of locator and/or waitFor.
Note : waitFor is optional.You may or may not use it.