课程: Mobile Testing with Appium
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
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.…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
Locator strategies and finding elements: Theory3 分钟 38 秒
-
(已锁定)
Locator strategies and finding elements: Practice5 分钟 24 秒
-
(已锁定)
Waiting for elements: Theory3 分钟 24 秒
-
(已锁定)
Waiting for elements: Practice3 分钟 35 秒
-
(已锁定)
Basic element interaction10 分钟 15 秒
-
(已锁定)
Element discovery: Getting app source6 分钟 30 秒
-
(已锁定)
Element discovery: Appium inspector6 分钟 2 秒
-
(已锁定)
Challenge: Find a new element1 分钟 6 秒
-
(已锁定)
Solution: Find a new element7 分钟 30 秒
-
(已锁定)
-
-