4

enter image description here

I'm trying to remove the yellow infobar. Tried this, adding that parametet to shortcut with no luck:

C:\Users[USERNAME]\AppData\Local\Google\Chrome\Application\chrome.exe –disable-web-security

What is the correct way to hide this yellow infobar ? Thanks

user198989
  • 4,574
  • 19
  • 66
  • 95

4 Answers4

12

Add the --disable-infobars flag to your command to prevent the yellow infobar from appearing.

That infobar exists for a reason though: It is to warn that a dangerous feature is being used. I recommend against hiding the infobar, because sooner or later you will accidentally visit your bank's website and another malicious website in the same unprotected browsing session.

Rob W
  • 341,306
  • 83
  • 791
  • 678
  • Does not work in newer (v77+) versions of `chromium-browser`. [You need to make it a browser policy.](https://www.chromium.org/administrators/policy-list-3#CommandLineFlagSecurityWarningsEnabled) – Wimateeka Dec 09 '19 at 19:13
  • May I know from where I can get all chrome options? – Qais Bsharat Apr 11 '20 at 11:48
3

While automation testing if you want to disable this yellow bar you can add this code:

var chromeOption = new ChromeOptions();    
chromeOption.AddArguments("disable-infobars");

driver = new ChromeDriver(chromeOption);
Koopakiller
  • 2,838
  • 3
  • 32
  • 47
2

You can use --app=desired_address_without_brackets. Works in Chrome 80.

Semi-official Chrome(ium?) doc for command line options

it will launch chrome in App mode and hide such infobars (alongside the adress bar and maybe tabs). Not always applicable, but --disable-infobars removed in Chrome 76 anyway.

RollingHog
  • 121
  • 7
0

the one hes talking about is the yellow infobar that tells you they wont update chrome. Its the only info bar that pops up that ive ever come across an is a nusance.select the target box put

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-infobars
lxg
  • 12,375
  • 12
  • 51
  • 73
  • `--disable-infobars` is mentioned as a fix at https://www.askvg.com/tip-disable-windows-xp-and-vista-will-no-longer-be-supported-yellow-infobar-in-google-chrome/ it also does not warn you that you are suppressing ALL infobar message (see https://chromium.org/user-experience/infobars). There maybe future useful messages that get suppressed as well. Option removed in some Chrome 65 - 66 versions. – Skip R Apr 11 '19 at 19:02