| Index: chrome/test/chromedriver/chromedriver.py
|
| diff --git a/chrome/test/chromedriver/chromedriver.py b/chrome/test/chromedriver/chromedriver.py
|
| index 8e4bb470ef917f950bb55837f27914d12ca99586..796f71c1e5fd94ed2ba37e6b1118e0ff16d7b5a6 100644
|
| --- a/chrome/test/chromedriver/chromedriver.py
|
| +++ b/chrome/test/chromedriver/chromedriver.py
|
| @@ -17,8 +17,12 @@ class StaleElementReference(ChromeDriverException):
|
| pass
|
| class UnknownError(ChromeDriverException):
|
| pass
|
| +class JavaScriptError(ChromeDriverException):
|
| + pass
|
| class XPathLookupError(ChromeDriverException):
|
| pass
|
| +class Timeout(ChromeDriverException):
|
| + pass
|
| class NoSuchWindow(ChromeDriverException):
|
| pass
|
| class InvalidSelector(ChromeDriverException):
|
| @@ -34,7 +38,9 @@ def _ExceptionForResponse(response):
|
| 9: UnknownCommand,
|
| 10: StaleElementReference,
|
| 13: UnknownError,
|
| + 17: JavaScriptError,
|
| 19: XPathLookupError,
|
| + 21: Timeout,
|
| 23: NoSuchWindow,
|
| 32: InvalidSelector,
|
| 33: SessionNotCreatedException,
|
| @@ -152,6 +158,11 @@ class ChromeDriver(object):
|
| return self.ExecuteSessionCommand(
|
| 'executeScript', {'script': script, 'args': converted_args})
|
|
|
| + def ExecuteAsyncScript(self, script, *args):
|
| + converted_args = list(args)
|
| + return self.ExecuteSessionCommand(
|
| + 'executeAsyncScript', {'script': script, 'args': converted_args})
|
| +
|
| def SwitchToFrame(self, id_or_name):
|
| self.ExecuteSessionCommand('switchToFrame', {'id': id_or_name})
|
|
|
|
|