Wonder if anyone is also seeing this? OR could help me debug what is going on. this is an app on the iphone simulator and I started seeing it on v0.7.0
At first, I thought it was some timing issue so I added some delays on my scripts.
When getting the page source, it seems to think that nothing is loaded. But I can actually see the app launched.
This occurs randomly, so I can't pinpoint where or why it thinks the app is not loaded. I can see that it fixes itself, by quitting and restarting the driver.
>>> d.getPageSource()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Command duration or timeout: 166 milliseconds
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info:
os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.4', java.version: '1.6.0_45'
Session ID: 9c729b02-23d1-46d7-bac0-572069a4a608
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=MAC, databaseEnabled=false, javascriptEnabled=true, browserName=iOS, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, version=6.0}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.getPageSource(RemoteWebDriver.java:414)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: An error occurred while executing user supplied JavaScript. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 166 milliseconds
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info:
os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.4', java.version: '1.6.0_45'
Session ID: 9c729b02-23d1-46d7-bac0-572069a4a608
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=MAC, databaseEnabled=false, javascriptEnabled=true, browserName=iOS, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, version=6.0}]
debug: Appium request initiated at /wd/hub/session/9c729b02-23d1-46d7-bac0-572069a4a608/source
info: [INST] 2013-06-10 14:07:22 +0000 Default: Got new command 4 from instruments: wd_frame.getPageSource()
info: [INSTSERVER] Got result from instruments: {"status":17,"value":"'[object UIAElementNil]' is not a function (evaluating 'wd_frame.getPageSource()')"}
info: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"'[object UIAElementNil]' is not a function (evaluating 'wd_frame.getPageSource()')"},"sessionId":"9c729b02-23d1-46d7-bac0-572069a4a608"}