Getting exception in Selenium when executing test script

Answered

Getting following Exception on executing Selenium test script in Eclipse IDE

Exception in thread “main” org.openqa.selenium.WebDriverException: f.QueryInterface is not a function

Command duration or timeout: 30 milliseconds

Build info: version: ‘2.40.0’, revision: ‘fbe29a9’, time: ‘2014-02-19 20:55:11’

System info: host: ‘dlulsharm08502’, ip: ‘192.168.0.5’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.7.0_51’

Session ID: ef5e005f-f798-45c8-8015-e8a8e81590b3

Driver info: org.openqa.selenium.firefox.FirefoxDriver

Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=27.0.1}]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573)

at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:278)

at automationFramework.FisrtTestCase.main(FisrtTestCase.java:12)

Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: f.QueryInterface is not a function

Build info: version: ‘2.40.0’, revision: ‘fbe29a9’, time: ‘2014-02-19 20:55:11’

System info: host: ‘dlulsharm08502’, ip: ‘192.168.0.5’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.7.0_51’

Driver info: driver.version: unknown

at <anonymous class>.FirefoxDriver.prototype.get(file:///C:/Users/lsharm/AppData/Local/Temp/anonymous4822978569340563511webdriver-profile/extensions/fxdriver@googlecode.com/components/driver_component.js:8767)

at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/lsharm/AppData/Local/Temp/anonymous4822978569340563511webdriver-profile/extensions/fxdriver@googlecode.com/components/command_processor.js:10878)

at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///C:/Users/lsharm/AppData/Local/Temp/anonymous4822978569340563511webdriver-profile/extensions/fxdriver@googlecode.com/components/command_processor.js:10883)

at <anonymous class>.DelayedCommand.prototype.execute/<(file:///C:/Users/lsharm/AppData/Local/Temp/anonymous4822978569340563511webdriver-profile/extensions/fxdriver@googlecode.com/components/command_processor.js:10825)

Test Case script as followed:


 

Train Asked on August 14, 2014 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)
    Best answer

    Hi Rishab,

    Please use the below metioned command

     

     

    As driver.get method needs mandatory protocol name also as a part of URL

    Regards,
    Lakshay Sharma

    Professor Answered on August 14, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.