Running ghostdriver using java gives error

677 Views Asked by At

I am using remote ubuntu machine to run my test cases. I have jenkins configured with github. I can access this machine using putty.exe using my windows7 machine. I want to use phantomjs to run headless test cases (schedule jobs)i.e. when my windows machine is off the tests will run on remote ubuntu machine which is always on.

Now the problem is , when I am build now it gives error :

Caused by org.openqa.selenium.HasInputDevices

...
...

My setup() method and pom looks like :
setup()

DesiredCapabilities caps = new DesiredCapabilities();
             caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,"/usr/bin/phantomjs");                  
             driver = new PhantomJSDriver(caps);

            driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

            driver.get(Production);


pom.xml

<dependency>
    <groupId>com.github.detro.ghostdriver</groupId>
    <artifactId>phantomjsdriver</artifactId>
    <version>1.0.3</version>
</dependency>

Edit : Problem of HasInputDevices has been resolved by adding selenium 2.34.0 jar dependency
But on running above test it is still giving error :

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.34.0', revision: '11cd0ef93615408e0b6b3bfa28defe125906461a', time: '2013-08-06 11:43:14'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_25'
Driver info: driver.version: PhantomJSDriver
0

There are 0 best solutions below