Skip to content

Commit fd0e478

Browse files
committed
Added openNotification and waitForIdle support in UiAutomatorHelper
1 parent e8d697e commit fd0e478

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/com/dtmilano/android/uiautomator/uiautomatorhelper.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '12.1.2'
21+
__version__ = '12.2.0'
2222

23+
import json
2324
import os
25+
import platform
26+
import re
2427
import subprocess
2528
import sys
26-
import platform
2729
import threading
28-
import re
29-
import json
30+
3031
try:
3132
import requests
3233
REQUESTS_AVAILABLE = True
@@ -258,6 +259,9 @@ def longClick(self, **kwargs):
258259
else:
259260
return self.__httpCommand('/UiDevice/longClick', params)
260261

262+
def openNotification(self):
263+
return self.__httpCommand('/UiDevice/openNotification')
264+
261265
def pressBack(self):
262266
return self.__httpCommand('/UiDevice/pressBack')
263267

@@ -284,6 +288,10 @@ def takeScreenshot(self, scale=1.0, quality=90):
284288
params = {'scale': scale, 'quality': quality}
285289
return self.__httpCommand('/UiDevice/takeScreenshot', params)
286290

291+
def waitForIdle(self, timeout):
292+
params = {'timeout': timeout}
293+
return self.__httpCommand('/UiDevice/waitForIdle')
294+
287295
#
288296
# UiObject
289297
#

0 commit comments

Comments
 (0)