Running Edge in headless mode is not working

Viewed 116

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 below 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 code runs fine but the Edge Brower is still visible

obj.Start

'Open URL in Edge Browser

obj.Get sURL

Thanks - Jen

1 Answers
Dim obj As Selenium.EdgeDriver Set obj = New Selenium.EdgeDriver

obj.SetCapability "ms:edgeOptions", _ "{" & _ """args"":[""headless""]" & _ "}"

obj.Start

'https://gist.github.com/yas78/2a563995fde04c48260cebfe3aae371b

Related