课程: Mobile Testing with Appium
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Waiting for elements: Practice
- [Instructor] Okay, let's see how to wait for elements in practice. First of all, I have my Appium server and my Android emulator up and running. So now let's go to our code editor. We're starting off here with the Ch_04_04_Waiting_For_Elements_Before.Java class. What we want to do initially is remove the Thread.sleep in the set-up method, and remove any extraneous lines in our test method. These two here, so that all we're doing is launching the app and finding an element using Driver.findElement. Okay, now let's run our test just to see what happens. The test is complete, let's head back to IntelliJ to see what happened and as predicted we got a failure. If we read the failure text, we will see that the issue is that an element couldn't be found. This is exactly the problem we expected, without the Thread.sleep protecting us our script tried to find the element before it was present. Now we can apply our WebDriverWait knowledge to fix the situation. So let's go ahead and update the…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-