enter image description hereI am trying to post something on facebook using selenium. But after successfully logged in, i am getting SSL certificate to allow or block the notification of Facebook. I am not aware how to handle that, it is not an alert, not sure how to select block or close SSL, and continue automating the web page. I'd really appreciate the help here.

DesiredCapabilities handlSSLErr = DesiredCapabilities.chrome ()       
handlSSLErr.setCapability (CapabilityType.ACCEPT_SSL_CERTS, true)
WebDriver driver = new ChromeDriver (handlSSLErr);
  • 1
    I am slightly confused. SSL should work magicly, atleast for Facebook. It is a public website with valid certificates. How does the allow/block screen look like? Maybe the time/date of the test-runner-server is wrong. That could result in SSL issues. May 24, 2019 at 8:33
  • Thanks @NielsvanReijmersdal for your response. I have attached the screen-shot of the issue. Could you please look into this? May 26, 2019 at 15:25

1 Answer 1


This isn't actually related to SSL certificates , notifications is something else.

If you don't intend to use them turn them off

You can have the browser started with them disabled by adding


to the browser command line via chrome options.

This can be done programmatically as follows

ChromeOptions options = new ChromeOptions();

You can find docs for this here http://chromedriver.chromium.org/capabilities

Doing this will might weaken your testing as most people have them enabled. That said, I have yet to find a website that i trust with this power and should probably set this on my actual browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.