{"action":"created","issue":{"url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/54","labels_url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/54/comments","events_url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/54/events","html_url":"https://github.com/florentbr/SeleniumBasic/issues/54","id":124340060,"number":54,"title":"Error:23 - NoSuchWindowError Window not found. While Testing with Firefox Driver","user":{"login":"zaka786khan","id":7099671,"avatar_url":"https://avatars.githubusercontent.com/u/7099671?v=3","gravatar_id":"","url":"https://api.github.com/users/zaka786khan","html_url":"https://github.com/zaka786khan","followers_url":"https://api.github.com/users/zaka786khan/followers","following_url":"https://api.github.com/users/zaka786khan/following{/other_user}","gists_url":"https://api.github.com/users/zaka786khan/gists{/gist_id}","starred_url":"https://api.github.com/users/zaka786khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaka786khan/subscriptions","organizations_url":"https://api.github.com/users/zaka786khan/orgs","repos_url":"https://api.github.com/users/zaka786khan/repos","events_url":"https://api.github.com/users/zaka786khan/events{/privacy}","received_events_url":"https://api.github.com/users/zaka786khan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-30T12:08:35Z","updated_at":"2016-01-06T19:12:14Z","closed_at":null,"body":"Often Selenium Test fails suddenly saying Error:23 - NoSuchWindowError Window not found. error. It seems that firefox is disconnected or unlinked with selenium which was working fine. No command further executes. \r\n\r\nWhat is the problem. Why testing fails while it was running smoothly but suddenly it seems that driver does not handshake any more with selenium and is disconnected/unlinked from sleniumbasic commands and does not/could not listen from selenium anymore even driver.quit or driver.close also does not work to kill the running instance. \r\n\r\nWhat is the solution if test goes failure due to this reason. What is the best practice to continue performing tests or re-link or close existing driver. \r\nThanks."},"comment":{"url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/comments/169424064","html_url":"https://github.com/florentbr/SeleniumBasic/issues/54#issuecomment-169424064","issue_url":"https://api.github.com/repos/florentbr/SeleniumBasic/issues/54","id":169424064,"user":{"login":"dornech","id":13497458,"avatar_url":"https://avatars.githubusercontent.com/u/13497458?v=3","gravatar_id":"","url":"https://api.github.com/users/dornech","html_url":"https://github.com/dornech","followers_url":"https://api.github.com/users/dornech/followers","following_url":"https://api.github.com/users/dornech/following{/other_user}","gists_url":"https://api.github.com/users/dornech/gists{/gist_id}","starred_url":"https://api.github.com/users/dornech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dornech/subscriptions","organizations_url":"https://api.github.com/users/dornech/orgs","repos_url":"https://api.github.com/users/dornech/repos","events_url":"https://api.github.com/users/dornech/events{/privacy}","received_events_url":"https://api.github.com/users/dornech/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T19:12:13Z","updated_at":"2016-01-06T19:12:13Z","body":"I encounter the same problem with some websites. I use the window counter to discove rnewly opened windows:\r\n     i_Windows = objSelenium.Windows.Count\r\n     objSelenium.DOSOMETHING\r\n     If (i_Windows < objSelenium.Windows.Count) Then\r\n         DOESOMETHING i. e. close windows\r\n    End If\r\n\r\nHowever, regarding ads: why do you not use adblocker in your webdriver instance ?\r\nInstalling a downloaded copy of the the respective xpi / crx file during webdriver start is straight forward. I provided sample code earlier.\r\n\r\n"}}