Skip to main content

How to handle the SSL certificate and Insure certificate in Selenium WebDriver?


We need to add capabilities in the chrome browser

DESIRED CAPABILITIES IS THE CLASS WHO HELP TO CUSTOMIZED THE CHROME BROWSER.

So first we need to create an object of the Desired Capabilities and then accept the SSL or Insure certificate. After this we need to create our local chrome driver option and provide the Desired Capabilities information to the local chrome driver option so that while creating the chrome driver object, we can pass the local chrome driver to pass the Desired Capabilities.
below is the code to use.


DesiredCapabilities dc = DesiredCapabilities.chrome();

// Accept insure certificate


dc.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);

// Accept SSL certificate

dc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

//Local chrome option to set the capabilities

ChromeOptions co = new ChromeOptions();

co.merge(dc);

System.setProperty("webdriver.chrome.driver", "C:\\Work\\chromedriver.exe");

System.setProperty(ChromeDriverService.CHROME_DRIVER_SILENT_OUTPUT_PROPERTY,"true");

//Pass the chrome option object into the chromedriver to tell the capabilities

WebDriver driver = new ChromeDriver(co);

Comments

Popular posts from this blog

Why Jmeter is best option for Performance Testing?

There are multiple tools in market for performance testing of any software but Jmeter is the best solution among all of them due to some reason listed below 1) Jmeter is the open source application so users who use this application will not to pay anything. 2) You can use Jmeter for performance of any web application,  Databases and Web Services (REST and SOAP APIs). 3) Jmeter have the user friendly UI component so it is very easy to use. 4) Jmeter can be used to simulate to put maximum number of concurrent users on a server, network or object to test its strength or to analyze overall performance under different load types. 5) Jmeter also use for functional testing for static( JavaScript and HTML) and dynamic( JSP, Servlets and AJAX) resources. 6) Jmeter provides Verity of graphical representations for performance report so it is easy to understand.

How You Can Test Database?

Now we know the Database Testing which you can learn in my last article. In this article we will discuss about the steps that need to following to test any Database. Database Tester should have some basic knowledge regarding SQL Command like DDL (create/drop),  DML (Insert/Delete/Update) and DCL (Grant/Revoke).

Causes of Software Defects

It is practically impossible that developer develop a bug free software and that software we can deliver without Testing. If the complexity of the software increased then there must be bugs that can harm the users who will use that software.