Skip to content

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

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

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

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
2 participants