NoSuchWindowException not thrown when switching to a popup window being closed

Confirmed Issue #11909201 • Assigned to John J.

Details

Author
Wang H.
Created
May 5, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
40.15063
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Test scenario is as below:

  • On the parent window, click a button to launch a popup window by js
window.open("close3.html", '_blank', 'toolbar=0,location=0,menubar=0');
  • On the popup window, click a button to close itself by js
function closeWindow()
{
   window.top.opener=null;
   window.top.open("", "_self", "");
   window.top.close();
}
  • Switch to all remaining windows and get page sources

This scenario worked perfectly in 14393, logs as below:tape 

2017-05-05 11:50:13,529 INFO  - {"action":"switchTo.window","params":"1"}
2017-05-05 11:50:13,538 INFO  - {"action":"getPageSource","params":""}
2017-05-05 11:50:13,542 INFO  - {"action":"switchTo.window","params":"3"}
2017-05-05 11:50:13,547 INFO  - {"action":"switchTo.window","params":"1"}

But it doesn’t work in 15063 now, logs as below:

2017-04-27 11:49:57,083 INFO  - {"action":"switchTo.window","params":"1048576-BrowserFrame-1"}
2017-04-27 11:49:57,087 INFO  - {"action":"getPageSource","params":""}
2017-04-27 11:49:57,089 INFO  - {"action":"switchTo.window","params":"0-InvalidType-3"}
2017-04-27 11:49:59,753 ERROR - {"exception":"[code:error.exec.driver.unknown, rawMsg:Unknown error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.64 seconds

In 14393 the window handle is a digit such as 1 and 3, when 3 is closed, the NoSuchWindowException will be thrown and we will catch it and move on. While on 15063 the popup window handle is the weird 0-InvalidType-3, and no exception would be thrown out.

Kindly please take a look into it, thanks a lot!

Regards,
Hanbo

Attachments

0 attachments

    Comments and activity

    • Changed Title from “Edge webdriver error switching to a popup window being closed” to “NoSuchWindowException not thrown when switching to a popup window being closed on Edge webdriver”

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Steps to Reproduce

      Changed Assigned To to “Mike J.”

      Changed Assigned To from “Mike J.” to “John J.”

      Changed Title from “NoSuchWindowException not thrown when switching to a popup window being closed on Edge webdriver” to “NoSuchWindowException not thrown when switching to a popup window being closed”

      Changed Status to “Confirmed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in