Using Selenium and VBA to navigate Chrome, but getting popup: Loading of unpacked extensions is disabled by the administrator

Viewed 129

I am trying to use selenium to open Chrome, but I am getting an popup that I can't resolve. It seems a solution has been found using JAVA, but I can't easily find something for VBA. In case the image doesn't load, it says "Failed to load extension from: <>local location<>. Loading of unpacked extensions is disabled by the administrator." enter image description here

The closest thing I have found is this line, but it doesn't seem to do anything.

.SetPreference "profile.default_content_setting_values.notifications", 2

Here is the full code:

Option Explicit
Public Sub Demo()
    Dim d As WebDriver
    Set d = New ChromeDriver
    Const URL = "https://www.google.com/"


    With d
    .SetPreference "profile.default_content_setting_values.notifications", 2
        .Start "Chrome"
        .Get URL
        .FindElementById("lst-ib").SendKeys "Selenium basic GitHub"
         .FindElementsByTag("form")(1).FindElementByCss("input[value='Google Search']").Click
        '.Quit
    End With
End Sub
0 Answers
Related