Selenium interacting with: your connection is not private

后端 未结 3 1476
醉酒成梦
醉酒成梦 2021-01-14 10:54

I\'m trying to interact with the page \"Your connection is not private\".

The solution of using options.add_argument(\'--ignore-certificate-errors\') is

3条回答
  •  孤独总比滥情好
    2021-01-14 11:44

    This is how i handle this problem:

    import org.openqa.selenium.chrome.ChromeOptions;
    import org.openqa.selenium.remote.CapabilityType;
    
    ChromeOptions capability = new ChromeOptions();
    capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
    capability.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS,true);
    
    WebDriver driver = new ChromeDriver(capability);
    

提交回复
热议问题