I tired to implement Phantomjs driver to Selenium tests but it throws me this error. java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.find(Ljava/lang/String;)Ljava/lang/String; The Phantom library is https://mvnrepository.com/artifact/org.jboss.arquillian.extension/arquillian-phantom-driver version 1.2.1.1 and Java version is 1.8 Implementation looks like:
if( driver == null )
{
if( which == CHROME )
{
System.setProperty("webdriver.chrome.driver", which);
driver = new ChromeDriver();
}
else if ( which == PHANTOM )
{
System.setProperty("webdriver.phantomjs.driver", which);
driver = new PhantomJSDriver();
}
}
What should I do to force it to work? Is it right Phantom library? Thanks.