From the course: Advanced Appium

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Solution: Multiple contexts in one test

Solution: Multiple contexts in one test - Appium Tutorial

From the course: Advanced Appium

Start my 1-month free trial

Solution: Multiple contexts in one test

(upbeat techno music) - [Instructor] Welcome back. Let's have a look at how I chose to solve the challenge of automating the little webview-based app we saw in an earlier video. First, let's have a look at how I filled out the locator strategies. For the Webview demo button, I used the information we already had encoded in our previous webview automation example, to use the selector Webview Demo. For the URL_Field, I found that the best selector was this particular xpath stream, //XCUIElementTypeTestField, with the name attribute set to urlInput. So we're finding the element by a combination of its name and its type. For the GO_BUTTON, I found that it was the first result for AccessibilityID of navigateBtn, so I was able to use that. Now let's scroll down to line 59 or 60. Here, our testHybridApp method. And let's check out the implemented test. Step one was fairly easy to implement. We just find the webview…

Contents