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.
Element discovery: Getting app source - Selenium Tutorial
From the course: Mobile Testing with Appium
Element discovery: Getting app source
- [Man] Earlier in the course we showed how to automate a login screen using Appium. I've got that code, loaded up now as chapter four, six page source before dot Java. You might recall that we're finding elements primarily by accessibility ID. You can see, for example, down here in our test method, that we're finding an element using a username selector here and another one using a password selector here. But how do we know that these selectors are correct for our app? Earlier you had to just take my word for it and now we'll explore one way to check for ourselves, using a special driver method called get page source. Even though mobile apps are not webpages, Appium can give you an XML representation of the UI hierarchy, including lots of interesting information about particular elements on-screen. We can call the get page source method anytime we want and we'll get back an XML string showing us everything Appium can see about the app, at that point in time. So let's give this a try.…
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)
-
-