`disable-infobars` gets lost in Selenide
See original GitHub issueThe problem
Selenide opens browser with an annoying “this browser is being controlled by automated software” infobar at the top, thought I add disable-infobars
option. This option still works when I use pure Selenium (see code below).
Code To Reproduce Issue
public class ChromeOptionsTest {
WebDriver driver;
@Test
void viaOptions() {
ChromeOptions options = new ChromeOptions();
options.addArguments("disable-infobars");
driver = new ChromeDriver(options);
driver.navigate().to("https://google.com"); // NB! No infobar
sleep(3000);
}
@Test
void viaCapabilities() {
ChromeOptions options = new ChromeOptions();
options.addArguments("disable-infobars");
DesiredCapabilities caps = DesiredCapabilities.chrome();
caps.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(caps);
driver.navigate().to("https://google.com"); // NB! No infobar
sleep(3000);
}
@Test
void viaSelenide() {
ChromeOptions options = new ChromeOptions();
options.addArguments("disable-infobars");
DesiredCapabilities caps = DesiredCapabilities.chrome();
caps.setCapability(ChromeOptions.CAPABILITY, options);
Configuration.browser = "chrome";
Configuration.browserCapabilities = caps;
open("https://google.com"); // NB! Infobar is visible! Like `disable-infobars` didn't work.
sleep(3000);
}
@AfterEach
void tearDown() {
if (driver != null) driver.quit();
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
How to remove the infobar "Microsoft Edge is being controlled ...
I tried to set the same options and I got a browser launched without the infobar, but it is a chrome browser NOT...
Read more >Selenium - Disabling InfoBar warning "Chrome is ... - YouTube
Selenium - Disabling InfoBar warning "Chrome is being controlled by automated test software".
Read more >Disable browser location on Execution - Katalon Community
I am just wondering if there is a flag or something that I can set so that when the browser is launched, the...
Read more >webdriverio/webdriverio - Gitter
I dont wanna disable all of them, just "chrome is being controlled by ... how we can override the selenium configs :P i...
Read more >window.chrome.runtime not available in chrome driver.
we were seeing that the app gets stuck at a certain page and doesn't load further. ... You can disable such info bars...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@asolntsev Thanks, friend! your code in the topic start is the best show-case I’v found so far on the issue. Only you need to correct the name to “Capabilities are lost in Selenide”. Change “disable-infobars” to “start-maximized” and you ll see this one is lost as well. One may link it to #676 but this one is better because it shows the difference 😃 it is also clean no try to “merge” options and other complication UPD: Sorry fried for commenting to closed issue , seems fixed somewhere before Selenide v. 5.17.3. Been working on an old project with 5.5.1 so come across it anew
I think it is duplicate of https://github.com/selenide/selenide/issues/676