You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'no such window' due to windowmanager.py/_select_matching() #390
'no such window' exception will be received if a test calls select window by name/title right after a 'close window' call. it is due to _select_matching() calls get_current_window_handle() which is undefined after 'close window' call, this can be found in http://www.w3.org/TR/webdriver/#defining-window-and-frame,
6.4 Close Window
The close command closes the window that commands are currently being sent to. If this means that a call to get the list of window handles would return an empty list, then this close command must be the equivalent of calling "quit". That is, if the final window of a session is closed, then the session quits.
Once the window has closed, future commands must return a status code of no such window until a new window is selected for receiving commands.
so the right way is to skip ' browser.switch_to_window(starting_handle)' if catch this exception.
another work around is simply append below to _browsermanagement.py -> def close_window(self):
handles = self._current_browser().get_window_handles()
if len(handles) >= 1:
self._current_browser().switch_to_window(handles[-1])
@divfor, being as you've looked so closely into this would you be interested in doing a PR?
I have some stuff I'm working on at work right and I'm going to be out of town Thursday Through Sunday so I won't be able to tackle this until at least next week.
Activity
just-be-dev commentedon May 11, 2015
@divfor, being as you've looked so closely into this would you be interested in doing a PR?
I have some stuff I'm working on at work right and I'm going to be out of town Thursday Through Sunday so I won't be able to tackle this until at least next week.
divfor commentedon May 12, 2015
submitted in PR #394