0

I'm using Excel VBA with Selenium Basic to automate Chrome. So far the code is working fine but I get this annoying error message

"Failed to load extension from: C:\Users ... Loading of unpacked extensions is disabled by the administrator"

After I hit OK the code runs fine. I've seen past posts on how to handle this issue in other programming languages JS or C# but couldn't find anything with Excel VBA. Please help if possible, thank you.

I've tried the Application.DisplayAlerts = False On Error Resume Next

Dim obj As New WebDriver

obj.Start "chrome", "   "
obj.Get "http:\\google.com"

I'd like to either suppress the error message or automate the "enter" button when the window pops up to press OK.

DWP
  • 105
  • 1
  • 11
  • Please read [ask] and see why you shouldn't paste text as images (you get the msgboxes text with CTRL + c or search windows event viewer for office alerts). You should provide used versions of all involed software (office, selenium basic, chrome, chromedriver).. these links suggests using?`ChromeDriver`not`WebDriver` https://stackoverflow.com/questions/51552801/automate-google-chrome-using-vba-and-selenium?noredirect=1&lq=1 or set automation option to false https://stackoverflow.com/questions/43571119/loading-of-unpacked-extensions-is-disabled-by-the-administrator – ComputerVersteher Jul 14 '19 at 19:08
  • `Application.DisplayAlerts = False`, then do your stuff, then `Application.DisplayAlerts = True` to come back to normal state... if the error is thrown up to Excel, that should work. – Matteo NNZ Jul 14 '19 at 22:35

0 Answers0