I have some javascript code that opens a window waits for a redirect in that window and then closes that window. (This is to do some OAuth2 authentication with angular).
var popUp = $window.open(authUrl(), 'OAuthWindow', 'width=auto,height=auto');
//Do some stuff
popUp.close();
After this code has run calling webDriver.getWindowHandles() returns 2 window handles.
Also running in non-headless mode I can see both windows still even after popUp.close() has been called.
I think this might be causing some issues. Afterwards I can no longer fill form fields by calling sendKeys, this might be because it's using the wrong window handle.
I have some javascript code that opens a window waits for a redirect in that window and then closes that window. (This is to do some OAuth2 authentication with angular).
After this code has run calling webDriver.getWindowHandles() returns 2 window handles.
Also running in non-headless mode I can see both windows still even after popUp.close() has been called.
I think this might be causing some issues. Afterwards I can no longer fill form fields by calling sendKeys, this might be because it's using the wrong window handle.