From the course: Mobile Testing with Appium
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Locator strategies and finding elements: Practice - Selenium Tutorial
From the course: Mobile Testing with Appium
Locator strategies and finding elements: Practice
- [Instructor] For this practical video, I've made sure that I have an Appium server running as well as my Android emulator. Now let's have a look at the code. I'll switch to IntelliJ and the code example we're starting with here is chapter_4_2_Locator_Strategies_Before.JAVA. We're starting with the same code we ended with earlier to start and stop in Appium session. The only thing I've changed is I've added a static, thread.sleep in the setup method to make sure our app has fully loaded before we try and find an element. Using thread.sleep for this purpose is not a good practice but it helps us focus on what's important for now which is playing with the find element method. With this script we're going to upgrade our test method by removing the print statement and adding the find element API call to find the element that for our test tab we'll get us to the login screen. Now I happen to know that this element has an accessibility ID of login screen. So that's a strategy and selector…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Locator strategies and finding elements: Theory3m 38s
-
(Locked)
Locator strategies and finding elements: Practice5m 24s
-
(Locked)
Waiting for elements: Theory3m 24s
-
(Locked)
Waiting for elements: Practice3m 35s
-
(Locked)
Basic element interaction10m 15s
-
(Locked)
Element discovery: Getting app source6m 30s
-
(Locked)
Element discovery: Appium inspector6m 2s
-
(Locked)
Challenge: Find a new element1m 6s
-
(Locked)
Solution: Find a new element7m 30s
-
(Locked)
-
-