Selenium + Java · Lesson 42 of 44
Module 42: Advanced WebDriver
Your task
Implement enableInsecureCerts:
Write it in the editor, then press Check answer (Ctrl + Enter).
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.Proxy;
ChromeOptions options = new ChromeOptions();
// Bypass self-signed SSL certificate warnings:
options.setAcceptInsecureCerts(true);
// Configure corporate HTTP Proxy:
Proxy proxy = new Proxy();
proxy.setHttpProxy("proxy.corp.internal:8080");
options.setProxy(proxy);
WebDriver driver = new ChromeDriver(options);Internal testing environments often use self-signed SSL certificates or corporate proxy gateways. In this lesson, you will learn to accept untrusted certificates and configure proxy servers using Selenium Capabilities. Let's configure advanced WebDriver settings!
Part of the Selenium + Java course (Selenium with Java). Practice this concept live in the Selenium Online Compiler or explore our free automation practice form.
QA staging environments frequently use self-signed SSL certificates. Setting setAcceptInsecureCerts(true) bypasses this warning automatically.
Ready? Solve the task in the editor
Use Check answer to mark it complete. Hints are there if you need them.
___