Skip to content

edge headless mode doesn't work #18

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
mnru opened this issue Apr 9, 2024 · 1 comment
Open

edge headless mode doesn't work #18

mnru opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mnru
Copy link

mnru commented Apr 9, 2024

the code below works well

Sub testChromeHeadlessMode()
Dim driver As New WebDriver
Dim options As New WebDriverOptions
options.BrowserType = Chrome
options.ChromeArguments.Add "--headless"
driver.Chrome "driver/path"
driver.OpenBrowser options
Debug.Print "finished"
End Sub

but the code below doesn't work

Sub testEdgeHeadlessMode()
Dim driver As New WebDriver
Dim options As New WebDriverOptions
options.BrowserType = Edge
options.EdgeArguments.Add "--headless"
driver.Edge "driver/path"
driver.OpenBrowser options
Debug.Print "finished"
End Sub

I don't know how to fix this code

@er-ri
Copy link
Owner

er-ri commented Apr 12, 2024

Try the following code if --headless doesn't work.

    Set driver = New WebDriver
    edgeOptions.BrowserType = Edge
    edgeOptions.EdgeArguments.Add "--headless=new"
    driver.Edge "path\to\msedgedriver.exe"
    
    driver.OpenBrowser edgeOptions

@er-ri er-ri added the bug Something isn't working label Apr 12, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants