???Appium????????????л?Activity
???????????? ???????[ 2016/2/16 17:41:48 ] ?????????????
?????????appium????????????????????????ж???????acitivity????????????app????л?acitivity???????
?????????????л????activity?????????????desired_caps['appWaitActivity'] = 'xxxxxx'??????
??????????????л?activity???????webdriver?е?wait_activity()??????????
????wait_activity()??
1 def wait_activity(self?? activity?? timeout?? interval=1):
2 """Wait for an activity: block until target activity presents
3 or time out.
4
5 This is an Android-only method.
6
7 :Agrs:
8 - activity - target activity
9 - timeout - max wait time?? in seconds
10 - interval - sleep interval between retries?? in seconds
11 """
12 try:
13 WebDriverWait(self?? timeout?? interval).until(
14 lambda d: d.current_activity == activity)
15 return True
16 except TimeoutException:
17 return False
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11