Ke10 Ke10 - 5 months ago 19
Java Question

Java selenium phatomjs

I was wondering how if it was possible to use phatomjs without having to define your phatomjs dir ? so I would only have to use the following code segment.

WebDriver driver = new PhantomJSDriver();

Answer

You can avoid having to define the path to phantomjs executable by having it added to PATH environment variable.

Here you can find a quick sample how to do it on Windows.