accept ssl cert with marionette firefox webdrive python splinter

前端 未结 3 1652
北荒
北荒 2020-12-04 02:58

when using python splinter firefox 47 marionette new webdriver, it gives certificate error when access the website i want, i tried to accept ssl certs with

browser

3条回答
  •  无人及你
    2020-12-04 03:25

    edit: it's not necessary to use the nightly firefox anymore

    Rémi's answer is correct, thank you. I have been facing the same issue in Java, in case someone else stumbles across this here's the Java solution:

    DesiredCapabilities caps = DesiredCapabilities.firefox();
    caps.setCapability("acceptInsecureCerts", true);
    
    FirefoxDriver driver = new FirefoxDriver(caps);
    

    there isnt a CapabilityType.ACCEPT_INSECURE_CERTS yet as per Selenium version 3.3.1 and the CapabilityType.ACCEPT_SSL_CERTS doesn't work, thus use "acceptInsecureCerts". Also the constructor FirefoxDriver(binary, profile, capabilities) is deprecated but AFAIK this is the only way to use a custom Firefox binary (?).

提交回复
热议问题