How to Implement Selenium WebDriver with PhantomJS and Can we Use Sikuli with PhantomJS?
问题 I am trying to use following code for running my script in headless browser in PhantomJS. public void setUp() throws Exception{ Capabilities caps = new DesiredCapabilities(); ((DesiredCapabilities) caps).setJavascriptEnabled(true); ((DesiredCapabilities) caps).setCapability("takesScreenshot", true); ((DesiredCapabilities) caps).setCapability( PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "/Users/kamal.kumar/Desktop/phantomjs-2.1.1-macosx/bin/phantomjs.exe" ); // System