Ke10 Ke10 - 1 year ago 106
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 Source

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.