Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Target window already closed from unknown error: web view not found #1263

Answered by mdmintz
karthikkjr asked this question in Q&A
Discussion options

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.

You must be logged in to vote

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, run sbase 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

Comment options

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, run sbase 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.)

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /