Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
So this is the popup that I'm referencing:

https://i.stack.imgur.com/w0Abz.png

Everything is working completely fine except this one pop up which I can’t bypass.

Here is the code I'm using to connect to the url

public void execute(ProxyConnection proxy) {
		WebDriver driver = setupDriver(proxy);
		driver.get(URL);
		driver.manage().window().maximize();
        // Here I use test methods like shown
    }

	public WebDriver setupDriver(ProxyConnection proxyConnection) {
		System.setProperty("webdriver.chrome.driver", "MY PATH");

		String proxyadd = proxyConnection.getHostName() + ":" + proxyConnection.getPort();
		
		Proxy proxy = new Proxy();
		proxy.setHttpProxy(proxyadd);
		proxy.setSslProxy(proxyadd);
		
		ChromeOptions options = new ChromeOptions();
		options.setCapability("proxy", proxy);
		
		if (!debugMode) {
			options.addArguments("--headless");
		}

		return new ChromeDriver(options);
	}


I'm using ChromeDriver version: 91.0.4472

I'm using selenium-chrome-driver version: 3.8.0

Any help is greatly appreciated.

Still no answer to this. I even tried playing around with selenium and chrome versions but still no luck.

What I have tried:

Here is what I've tried to pass this:

https://{USERNAME}:{PASSWORD}@url - This still displays the same popup

driver.switchTo().alert().sendKeys(proxy.getUsername()); // Alert is never found.
driver.switchTo().activeElement().sendKeys(proxy.getUsername()); // Nothing happens
new Actions(driver).sendKeys(proxy.getUsername()).build().perform(); // Nothing is happening
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900