PhantomJsDriver
에 대한 일부 기능을 설정하고 있습니다. 그런 다음PhantomJSDriver가 내가 설정 한 기능을 사용하지 않는 이유는 무엇입니까?
DesiredCapabilities caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true);
caps.setCapability("cssSelectorsEnabled", false);
caps.setCapability("applicationCacheEnabled", true);
caps.setCapability("acceptSslCerts",true);
caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,phantomJsPath);
this.driver = new PhantomJSDriver(caps);
, 나는 드라이버가 사용하는 어떤 기능을 확인하십시오
는System.out.println(driver.getCapabilities());
출력 :
Capabilities [{
platform=XP,
acceptSslCerts=false,
javascriptEnabled=true,
browserName=phantomjs,
rotatable=false,
driverVersion=1.1.0,
locationContextEnabled=false,
version=1.9.7,
cssSelectorsEnabled=true,
databaseEnabled=false,
handlesAlerts=false,
browserConnectionEnabled=false,
proxy={proxyType=direct},
nativeEvents=true,
webStorageEnabled=false,
driverName=ghostdriver,
applicationCacheEnabled=false,
takesScreenshot=true}]
그것은 보여줍니다
cssSelectorsEnabled=true,
applicationCacheEnabled=false,
acceptSslCerts=false
왜 드라이버가없이 실행 내가 설정 한 기능은?
나는 동일한 문제가 있습니다. acceptSslCerts = true로 설정하면 작동하지 않습니다. – casper