0

I am trying to use PhantomJSDriver with selenium. However, it gives an error.

System.setProperty("phantomjs.binary.path", "C:\\Users\\Caglar\\Desktop\\Tepav CV\\Phantomjs\\bin\\phantomjs.exe");

WebDriver driver = new PhantomJSDriver(); 

This is the code but it gives error as follows:

package org.openqa.selenium.phantomjs does not exist
cannot find symbol WebDriver driver = new PhantomJSDriver();

I have seen the same examples on stackoverflow. Can you explain why it does not work? Which version of selenium should I use? Is there another way to use headless browser with selenium? I also tried HtmlUnitDriver but I was not able to scroll down so it did not work as well.

C.Aglar
  • 1,290
  • 2
  • 14
  • 30
  • Possible duplicate of [How can I resolve my class from a different jar with same structure like another](https://stackoverflow.com/questions/48192621/how-can-i-resolve-my-class-from-a-different-jar-with-same-structure-like-another) – undetected Selenium Mar 12 '18 at 14:37
  • 2
    maybe because it's no longer supported, see: https://github.com/SeleniumHQ/selenium/issues/5295 – timbre timbre Mar 12 '18 at 16:47
  • Use chrome/firefox in headless mode instead. PhantomJS is no longer supported. – Fenio Mar 12 '18 at 17:28

0 Answers0