Nov 13 2023 06:32 AM - edited Nov 29 2023 12:59 PM
A couple weeks ago I was on version 118 for both Edge/Driver and my Selenium code worked. It would bring up Edge, log in the user, maximize the window, navigate, etc.
Last monday Edge was updated to version 119 and it no longer worked. I updated the Edge Driver to match. It still does not work. I get an error message:
"Run-Time error '23':
NoSuchWindowError
Window not found: no such window: target window already closed from unknown error: web view not found"
While the Edge window is still visibly open. I Dim MicroEdge as Object outside the Sub so that it stays open after the process completes. The code below used to work (with or without the .SetCapability part) but now gives the error on the .Window.Maximize line. I've tried skipping to getting a website and it gives the same error.
Set MicroEdge = CreateObject("Selenium.EdgeDriver")
With MicroEdge
On Error GoTo SiteHandler
.SetCapability "ms:edgeOptions", "{""excludeSwitches"":[""enable-automation""]}"
.Start
.Wait 1000
.Window.Maximize
Anyone else having the same issue or have a solution?
Update: If I take out the .SetCapability line and manually select a user at the right speed it will recognize the window and I can pull up a site/maximize the window. Doing this gives more opportunity for human error, and brings back an info bar that will cause problems with some sites as it shifts things down the page. If I leave it in it seems that it processes the user selection too quickly and VBA/Selenium loses track of the window and thinks it's closed.
Dec 06 2023 12:18 AM
I'm having the exact same issue: any answers??
Dec 06 2023 05:15 AM
Dec 07 2023 05:48 AM