Hi,
I am using PhantomJS with GhostDriver in order to generate PDF documents from web pages from my Play/Scala project. So, I am using a simple phantomJS script to do this.
I am on the latest releases of both PhantomJS(2.0) and GhostDriver(1.2.0).
I am having issues trying to close/quit the driver (i.e. calling PhantomJSDriver.close/quit). The close/quit commands do nothing. But when I kill the process manually, I get an error saying - 'UnsupportedCommandException'.
I also tried having a remote phantomjs process running and connecting to it using RemoteWebDriver. But calling the 'RemoteWebDriver.executeScript' method throws up another error - 'Can't find variable: require'.
My guess is that the PhantomJSDriver uses the PhantomJSCommandExecutor and hence is able to execute the script, but since RemoteWebDriver uses the HttpCommandExecutor, it somehow cannot do it. So, I thought of passing in the phantomJS executor object explicitly to the RemoteWebDriver constructor, but found that PhantomJSCommandExecutor is not public and had to abandon that route.
I am not sure why the quit command does not work.
Any help/suggestion is much appreciated.
Thanks,
Meghana.