I have existing tests written in Java which use Selenium's JavascriptExecutor. These tests pass normally using the regular drivers. However now I'm trying out the PhantomJS driver + GhostDriver to run these tests headless. It seems the JavascriptExecutor is not running and returning a value. Is this a limitation of PhantomJS/GhostDriver or does the driver require a parameter I'm missing to execute the script. I do have
caps.setJavascriptEnabled(true);
set in my setup method. Though I belive as of 1.9 Javascript is enabled by default. So does this piece not work at all for GhostDriver or is there something I'm missing?