Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

edge headless mode doesn't work #18

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants