5

When I start Chrome by Chromedriver with Selenium, Infobar is not hiddened. Because chrome has updated version 65.x.x.x.
Here is my code:

[VB.NET]

Dim driverService = ChromeDriverService.CreateDefaultService

driverService.HideCommandPromptWindow = True

Dim chromeOp As New ChromeOptions

chromeOp.AddArgument("--disable-infobars")

chromeOp.AddArgument("--start-maximized")

CRDriver = New ChromeDriver(driverService, chromeOp)
7
  • downgrade Chrome?
    – Yu Zhang
    Commented Mar 7, 2018 at 20:33
  • 1
    Thank Yu Zhang. Our applications is for many users. Downgrade Google Chrome is not a viable solution. Any other solutions? Commented Mar 8, 2018 at 3:07
  • Its very bad for me, becouse I use click by coordinates and infobar knocks coordinates (( so, now I cant use fullscreen mode !!! Commented Mar 9, 2018 at 9:46
  • 1
    I also need this flag [--disable-infobars] in my automation test coz it captures image and validate it
    – reshma
    Commented Mar 15, 2018 at 8:01
  • It changes dimention of visible part of browser. It isn't good for me. Commented Mar 15, 2018 at 11:02

2 Answers 2

3

Disable-infobars flag has been removed per this merged commit below.

for more details check here:
1. chromium.googlesource.com
2. chromium-review.googlesource.com

This flag is no longer needed by the perf testing infrastructure and can be misused for malicious purposes, so remove it.

Update April 18, 2018:

--disable-infobars has been added back to Chrome 66.0.3359.117.

5
  • But this has little effect, because infobar will change the visible part.
    – Majkl
    Commented Mar 8, 2018 at 14:07
  • I beg to differ. the infobar does hide elements behind it, blocking Selenium from interacting with those elements. I'll be following the links to the chromium team for more info. Thanks for the links! Commented Mar 13, 2018 at 12:25
  • 3
    #false. This kills my visual tests... THANKS GOOGLE
    – Brine
    Commented Mar 13, 2018 at 15:31
  • 1
    The infobar doesn't block any elements based on my test. The top of the webpage starts below the infobar.
    – Xia M.
    Commented Mar 14, 2018 at 8:37
  • I think they have re-implemented it. bugs.chromium.org/p/chromium/issues/detail?id=820453#c6 No idea when/if it will be back in Chrome though.
    – Iainn
    Commented Mar 21, 2018 at 11:00
1

The alternative I'm using to solve this issue is using excludeSwitches: ['enable-automation'] on chromeOptions.

But after this, I'm still having an issue with Disable Extensions box, it's supposed to be hidden using the 'disable-extensions' flag on args, but isn't working for me. If someone can test it and report back should be great.

Not the answer you're looking for? Browse other questions tagged or ask your own question.