课程: Mobile Testing with Appium
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Locator strategies and finding elements: Practice - Selenium教程
课程: Mobile Testing with Appium
Locator strategies and finding elements: Practice
- [Instructor] For this practical video, I've made sure that I have an Appium server running as well as my Android emulator. Now let's have a look at the code. I'll switch to IntelliJ and the code example we're starting with here is chapter_4_2_Locator_Strategies_Before.JAVA. We're starting with the same code we ended with earlier to start and stop in Appium session. The only thing I've changed is I've added a static, thread.sleep in the setup method to make sure our app has fully loaded before we try and find an element. Using thread.sleep for this purpose is not a good practice but it helps us focus on what's important for now which is playing with the find element method. With this script we're going to upgrade our test method by removing the print statement and adding the find element API call to find the element that for our test tab we'll get us to the login screen. Now I happen to know that this element has an accessibility ID of login screen. So that's a strategy and selector…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-