florentbr / SeleniumBasic

A Selenium based browser automation framework for VB.Net, VBA and VBScript
BSD 3-Clause "New" or "Revised" License
421 stars 197 forks source link

Running Edge in headless mode is not working #241

Open jentredick opened 2 years ago

jentredick commented 2 years ago

I have been unable to run Edge in headless mode using Selenium with VBA in Excel - would someone be able to help me out with this? I can use the exact same code using the ChromeDriver and it works as expected (i.e. - browser is hidden)

Here is a snippet of the code I am using...

sURL = "http://www.google.com"

Dim obj As Selenium.EdgeDriver

Set obj = New Selenium.EdgeDriver
obj.AddArgument "--headless"   <-- the issue is that the Edge Brower is still visible

obj.Start

    'Open URL in Edge Browser
obj.Get sURL

Thanks - Jen

FrankFromGermany commented 2 years ago

I have the same problem with Edge.

vshivaku commented 2 years ago

Hey @jentredick are you able to open edge browser with above script. i am unable to actually. please find issue at https://github.com/florentbr/SeleniumBasic/issues/248. can you please help on this what things i am missing.

Maetes commented 1 year ago

This should work for you @jentredick

Dim brwsr As New EdgeDriver

    With brwsr
    .SetCapability "ms:edgeOptions", "{""args"":[""--headless""]}"
    End With

brwsr.Start "edge", ""

@florentbr do you plan to keep this repo actively maintained?