1
Vote

"Call could not be fullfield. JavaScript injection failed" when setting driver timeout

description

Hi guys,

I am using Windows Phone WebDriver with no issues but when I try to set some timeout i.e. I have the above error. I will put some more details here. I implement the following:
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.manage().timeouts().setScriptTimeout(60, TimeUnit.SECONDS);
And I get this exception:
org.openqa.selenium.WebDriverException: Call could not be fullfield. JavaScript injection failed.
Command duration or timeout: 129.40 seconds
Build info: version: '2.43.1', revision: '5163bceef1bc36d43f3dc0b83c88998168a363a0', time: '2014-09-10 09:43:55'
System info: host: 'some_host', ip: 'some_ip', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.7.0_75'
Session ID: 6b64d3d1-e89a-4f6c-ad11-3a9998356edd
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=WINDOWS, cssSelectorsEnabled=true, elementScrollBehavior=0, javascriptEnabled=true, browserName=internet explorer, handlesAlerts=false, nativeEvents=false, browserAttachTimeout=0, unexpectedAlertBehaviour=ignore, takesScreenshot=true, version=10}]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:770)

.........................

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:195)
    at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Do you know what is the issue? Maybe I am missing something in the implementation?

comments

vjrantal wrote Feb 19, 2015 at 6:05 AM

Yes, I think these are not currently implemented in the driver.

Didn't test it myself, but most likely, the language binding you use ends up doing an HTTP request to endpoint https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/timeouts which isn't handled by the driver and a "Not implemented"-response is returned.

Do you think these are key features to have in the driver for you to implement your use cases or have you found any workarounds? I think it would be fairly easy to implement these in the driver, if/when someone has time to do that.

As reference, the driver has handling for /session/:sessionId/timeouts/async_script and /session/:sessionId/timeouts/implicit_wait, but the latter isn't yet end-to-end implemented to it is just a dummy endpoint to make some existing tests pass.

innffinnitty wrote Feb 19, 2015 at 7:04 AM

I haven't found a workaroud... just counting on the default timeouts (of which values by the way I am not aware). What I see is that there are some tests that are failing with timeout issues like "Timed out after 30 seconds waiting for the next available test execution". This leads me to the fact that the default timeout is 30 seconds and I need to set it at least to 60...

My issue is that I am not .net developer and it's hard for me to find the place where this shall be implemented. On the other hand, I cannot wait forever this to be eventually implemented... I am not sure what to do... :)