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

How to Put Load on a Script in JMeter

In last post we discussed about how to record a test script and Firefox settings to run the script. In this post we will discuss about how the Thread Group will work, how can we put n number of users to perform load testing, In JMeter by using Thread Group, we can create virtual users. Thread Group is a set of thread which work in same scenario. There are multiple thread group are available which is use to configure how the virtual users interest with the application, How much load maintain and till how much time load maintain.

How to take the Screenshot in Selenium WebDriver?

If we want to take the screenshot then we have to convert our WebDriver object into the screenshot object. we need to change the behavior of the drive to take the screenshot . We can do it by casting

JMeter Overview Description

In this article we will go through the multiple section of JMeter and describe the tool information. we will discuss about every component of JMeter tool in this Article so that you can hands on while working on script on JMeter about these components.