Tried to work with Selenium using GhostDriver (actually, the driver is embedded into PhantomJS now), but java project fails on import the following elements:
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriverService;
import org.openqa.selenium.phantomjs.PhantomJSDriverService;
Error with package org.openqa.selenium.phantomjs
Googling shows that I'm not alone in this trouble (question on StackOwerflow), but I found no answer there.
Hmm...
Looks like Java just does not know about GhostDriver integrated into PhantomJS.exe and needs JAR file added to the project.
Okay. GhostDriver JAR could be downloaded here.
Also one can use maven dependency simple adding following lines to pom.xml:
<groupId>com.github.detro.ghostdriver</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.0.3</version>
</dependency>
0 коментарі:
Дописати коментар