-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Target window already closed from unknown error: web view not found #1263
-
I'm facing the below error while running the tests in Jenkins(Runs on Linux platform) after the recent chrome update. The tests are running fine in my local machine. On seeing the coding part, the window is switching back to parent window from child window after some validations. But looks like the parent window is already closed in Jenkins.
Error Trace:
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: headless chrome=99.0.4844.74)
Any suggestions are much appreciated. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions
Hi @karthikkjr That could mean a few different things:
- Your script called
driver.close()
on a window, and then you tried switching to it. - Possibly a driver/browser mismatch that led to an error that closed the window:
-- If you're using Chrome 99, runsbase install chromedriver 99
. - A website ran some Javascript that closed the window on its own.
Could be something else, but without seeing the actual code that led to the issue, it's going to be trickier to debug. SeleniumBase automatically closes browsers at the end of tests, so you probably don't need to close windows on your own, if that's what's happening. You might also want to try running your tests locally in --headless
mode, to se...
Replies: 1 comment
-
Hi @karthikkjr That could mean a few different things:
- Your script called
driver.close()
on a window, and then you tried switching to it. - Possibly a driver/browser mismatch that led to an error that closed the window:
-- If you're using Chrome 99, runsbase install chromedriver 99
. - A website ran some Javascript that closed the window on its own.
Could be something else, but without seeing the actual code that led to the issue, it's going to be trickier to debug. SeleniumBase automatically closes browsers at the end of tests, so you probably don't need to close windows on your own, if that's what's happening. You might also want to try running your tests locally in --headless
mode, to see if the website performs differently then (if you weren't already trying that.)
Beta Was this translation helpful? Give feedback.