Skip to content

Commit c064ef9

Browse files
authored
Merge pull request #328 from felipetortella/master
Adding new keyword adb command timeout
2 parents 321d0a0 + 54b8175 commit c064ef9

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

AppiumLibrary/keywords/_applicationmanagement.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,27 @@ def execute_adb_shell(self, command, *args):
231231
'command': command,
232232
'args': list(args)
233233
})
234-
234+
235+
def execute_adb_shell_timeout(self, command, timeout, *args):
236+
"""
237+
Execute ADB shell commands
238+
239+
Android only.
240+
241+
- _command_ - The ABD shell command
242+
- _timeout_ - Timeout to be applied to command
243+
- _args_ - Arguments to send to command
244+
245+
Returns the exit code of ADB shell.
246+
247+
Requires server flag --relaxed-security to be set on Appium server.
248+
"""
249+
return self._current_application().execute_script('mobile: shell', {
250+
'command': command,
251+
'args': list(args),
252+
'timeout': timeout
253+
})
254+
235255
def go_back(self):
236256
"""Goes one step backward in the browser history."""
237257
self._current_application().back()

0 commit comments

Comments
 (0)