- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to take care of SSL certificate issues in chrome browser in Selenium?
We can face SSL certificate issue because of the reasons listed below −
While the website was developed, its SSL certificate was not proper.
The site may have a self-signed certificate.
SSL not configured properly at the server level.
Example
import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; public class SSLCert { public static void main(String[] args) { // TODO Auto-generated method stub //Desired capabilities for general chrome profile DesiredCapabilities c=DesiredCapabilities.chrome(); c.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true); c.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); //ChromeOptions for local browser ChromeOptions ch= new ChromeOptions(); ch.merge(c); System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe"); WebDriver driver=new ChromeDriver(ch); } }
- Related Articles
- How does Selenium Webdriver handle SSL certificate in Chrome?
- How does Selenium Webdriver handle SSL certificate in Firefox?
- How to handle SSL certificate error using Selenium WebDriver?
- How does Selenium Webdriver handle the SSL certificate in Safari?
- How does Selenium Webdriver handle the SSL certificate in Edge?
- How to launch Chrome Browser via Selenium?
- How to invoke the Chrome browser in Selenium with python?
- Running chrome browser in inconginto Mode in Selenium
- How to run Selenium tests on Chrome Browser using?
- How to avoid the pop-up window in chrome browser with Selenium?
- How to open a link in new tab of chrome browser using Selenium WebDriver?
- nginx ssl certificate installation in linux
- Using the Selenium WebDriver - Unable to launch chrome browser on Mac
- How to get website SSL certificate validity dates with PowerShell?
- Is there any way to load an extension in chrome browser using Selenium Webdriver?

Advertisements