You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using 'selenium-java', version: '4.32.0'
In my test code i am passing chromedriver argument --ignore-certificate-errors. But my tests are still blocked by following security confirmation in the browser:
The information you're about to submit is not secure. Because this form is being submitted using a connection that's not secure, your information will be visible to others.
`public class IgnoreSSLErrorsExampleTest { @test
public void testWithSSLIgnored() {
// Set path to ChromeDriver
System.setProperty("webdriver.chrome.driver",
System.getProperty("user.dir") + "\driver\chromedriver.exe");
// Configure Chrome to ignore SSL certificate errors
ChromeOptions options = new ChromeOptions();
options.addArguments("--ignore-certificate-errors");
options.setAcceptInsecureCerts(true);
// Initialize WebDriver
WebDriver driver = new ChromeDriver(options);
try {
driver.get("http://******/login");
Thread.sleep(2000);
// Enter credentials and login
driver.findElement(By.cssSelector("#Username")).sendKeys("custserv_prod_auto");
driver.findElement(By.cssSelector("#Password")).sendKeys("C3y5Hd@f");
driver.findElement(By.cssSelector(".btn-primary")).click();
Thread.sleep(2000);
// Handle OTP (method placeholder)
passOTPToken();
// Click trust browser button
driver.findElement(By.xpath("//button[@id='accept-trust-browser-btn']")).click();
Thread.sleep(2000);
// Print the title of the page
System.out.println("Page title is: " + driver.getTitle());
} catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
driver.quit();
}
@diemol Thanks for your feedback. Yes we have to pass it as http, As this is a special arrangement for with subdomain url for our product, ex: http://prod1.abcd.com/login
And in order to avoid browser security complain we are already passing following chrome browser arguments:
-> addArguments("--ignore-certificate-errors");
-> setAcceptInsecureCerts(true);
But this arguments are not taking into consideration to avoid the browser security error. Would you please re-check, thanks in advnced.
http uses no certificates, so using those flags won't make any difference. You need to research if there is a flag in Chrome to deactivate that message.
What happened?
Hello, I am using 'selenium-java', version: '4.32.0'
In my test code i am passing chromedriver argument --ignore-certificate-errors. But my tests are still blocked by following security confirmation in the browser:
The information you're about to submit is not secure. Because this form is being submitted using a connection that's not secure, your information will be visible to others.
`public class IgnoreSSLErrorsExampleTest {
@test
public void testWithSSLIgnored() {
// Set path to ChromeDriver
System.setProperty("webdriver.chrome.driver",
System.getProperty("user.dir") + "\driver\chromedriver.exe");
}
private void passOTPToken() {
// TODO: Implement OTP logic
}
}`
Build info: version: '4.20.0', revision: '866c76ca80' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.12' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [e25ff1943560b0b1ba8ccb70906d8c83, findElement {using=css selector, value=.verifyotp-number:nth-child(1)}] Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 136.0.7103.114, chrome: {chromedriverVersion: 136.0.7103.92 (cb81a4cc5087..., userDataDir: C:\Users\mhasan\AppData\Loc...}, fedcm:accounts: true, goog :chromeOptions: {debuggerAddress: localhost:56267}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:56267/devtoo..., se:cdpVersion: 136.0.7103.114, setWind owRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: e25ff1943560b0b1ba8ccb70906d8c83 [INFO] [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
What browsers and operating systems are you seeing the problem on?
The text was updated successfully, but these errors were encountered: