How do we bring Edge browser to foreground?

By design Issue #11357481

Details

Created
Mar 22, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

We normally uses the following three ways to bring a browser to foreground :

  1. WebDriver driver = getDriver();
    String currentWindowHandle = driver.getWindowHandle();
    driver.switchTo().window(currentWindowHandle);
    ((JavascriptExecutor) driver).executeScript("alert(‘’)");
    driver.switchTo().alert().accept();

  2. ((JavascriptExecutor) driver).executeScript("window.focus()");

  3. driver.switchTo().window(“windowName”);

Unfortunately none of the above works in case of Edge. Are there other ways to achieve bringing Edge browser to foreground? I am using Selenium 2.53.0 and MicrosoftWebDriver 14393.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Mara P.”

      Changed Status to “By design”

    • There is no API in WebDriver to bring the browser to the foreground. Some browsers do this as a part as a side effect of doing something else.

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

    Sign in