课程: Mobile Testing with Appium
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Waiting for elements: Theory
- [Instructor] Now that we know how to find elements in Appium, it's important to learn how to find elements at the right time. The code that we've been writing so far looks similar to what I have on screen now. We start our Appium session. Then we wait for three seconds using thread.sleep. Then in our test method we find the login screen element. The reason we have thread.sleep here is that without it our element might not be found. Whenever we call driver.findelement, Appium will look to see if it can find the element at exactly that time. Appium is not super smart and doesn't know what's going on in the app. So it doesn't know if it should wait for the app to load or for something else to happen before it tries to find the element. A human user would, of course, notice that the app is still loading and not try and tap any buttons. But Appium is not yet that intelligent, so we have to make sure to build that intelligence into our test scripts. One strategy is to do what we're…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-