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.