Browser launched by web driver refresh page automatically

Not reproducible Issue #7112644

Details

Created
Apr 5, 2016
Privacy
This issue is public.
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

URL: 

Repro Steps:

  • Open microsoft web driver
  • navigate to “bing.com”
  • send “window handles” request -> result is “1”
  • right click a link on this page and open with new window.

Observer : the first page auto refresh

  • sendsend “window handles” request -> result is “2” and “3” . I don’t know why the window handle change from 1 to 2 or 3.

Expected Results:

  • It does not refresh page.
  • windowhandles requesting retreives valid value.

Actual Results:

Dev Channel specific:

Yes

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Kamen M.”

  • Hi Edge team,

    At that time, I send “windowhandle” request and receive “1” while the list of handles include “2” and “3”

  • Microsoft Edge Team

    Changed Assigned To from “Kamen M.” to “Ibrahim O.”

  • Thank you for your feedback. I am having difficulties reproducing this issue. I see that window handles returns the list of window handles that matches with each window handle. Additionally, I couldn’t see that any of the Edge windows being refreshed. This repro has been tested on windows version 1511, OS build 10586.218 and Web Driver insider build (“https://www.microsoft.com/en-us/download/confirmation.aspx?id=48740”) If you are using an older version of either windows or webdriver please update and try to reproduce this issue. If you are still able to repro or if I am missing a step in the repro please keep us posted we will be happy to assist you.

    All The best,
    The MS Edge Team

  • Thanks for your reply.
    I have work on win version 1511, OS build 14267.1000. Please take a look in an attached image :)

    • Open microsoft web driver.exe

    • new remote server and navigate to “bing.com”

    • send “window handles” request -> result is “1”

    • right click a link on this page and open with new window.
      Observer : the first page auto refresh and the second window is blank.

    • sending “windowhandles” request -> result is “2” and “3” although “windowhandle” result equals "1".

  • I think we miss communication because you miss the fourth step by manually.
    we must do right click on a link and open new window manually. After that, I see that the first page is non-responding state and refresh while the second page is blank.

  • Thank you for the update. I haven’t missed the fourth step. Since you have created a new window and the previous window is still present, you should get a list of window handles. In my case the first window handle has the value 1 and after we manually create a new window, now window handles returns 1 and 3. This result has been generated on both public and insider builds. Could you please provide your sample code? This will help our investigation.

    All the best,
    The MS Edge Team

  • Hi Ibrahim O,

    Thanks for your reply.
    Please watching video here https://drive.google.com/file/d/0B4ru143Qdbz-dkRha2pnY3JhODQ/view?usp=sharing.

    The code:

    public static void main(String[] args){
    try {
    URL urlHost = new URL(“http://localhost:17556/”);
    RemoteWebDriver driver = new RemoteWebDriver(urlHost,new DesiredCapabilities());

            driver.manage().timeouts().pageLoadTimeout(3000, TimeUnit.MILLISECONDS);
            driver.navigate().to("www.bing.com");
            String currentHandle = driver.getWindowHandle();
            System.out.println("current Handle " + currentHandle);
            Set lstWindows = driver.getWindowHandles();
            for(String window : lstWindows){
                System.out.println("lst window " + window);
            }
            
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
    }
  • Hi Ibrahim O,

    Did you watch it ?
    May you reproduce it?

  • I have attached a JAR file. Could you please run your MicrosoftWebDriver.exe first and then the JAR file. It should popup a message box that contains your window handle and then create additional Edge Window/s and click OK. Next dialog box will give you the list of the window handles. You should be able to see the first number matches with the number at the first dialog box.

    Having said that, you have mentioned that first window being refreshed during repro. This should not change your window handle unless it is relaunched. If it is possible could you also test this issue on a different computer to see if you can still repro.

    Best regards,
    The MS Edge Team

  • Thanks for your reply.
    Your sample make it easy.
    I can still repro on other computer.

    Here my result. Please watching it :)
    https://drive.google.com/file/d/0B4ru143Qdbz-U01tNHNkR2R4ejA/view
    Thanks

  • Another video on other machine ( newest window build )

    https://drive.google.com/file/d/0BxM7jdgF45kRT2xrX25CLVdYQkk/view

  • I watched the videos and I see that is repro on your end. I have tested exact same version of Windows and Webdriver which still is not repro. I suspect that Edge is being relaunched somehow during repro and that is reassigning the current handle value to a new one. That still shows the issue likely to be environment specific. 

    Could you please do two more tests, this will help our investigation.

    Do you see Edge being refreshed without using Webdriver. Just open Edge and right click any link open in new window observe if the first window is being refreshed. Also could you please run the sample that I previously send, and instead of right click and open in new window, this time try to create new window by using Edge icon on the taskbar or in your start menu see if you still able to repro.

    • I would suggest you to run your tests on a clean installed machine (you may use VM) which will also help us to eliminate external factors for repro. 

    Thank you for your assistance in the investigation.

    Best regards,
    The MS Edge Team

  • Thanks for your reply

    Case1: Open edge without web driver -> not occur
    Case2: New window by Edge icon on the taskbar -> not occur

    Therefore, issue happened if we use web driver and open new window by right click.

    I will set up clean machine and update late.

  • Microsoft Edge Team

    Changed Steps to Reproduce

    Changed Title from “Browser launched by web driver refresh page automatically” to “Browser launched by web driver refresh page automatically”

    Changed Assigned To from “Ibrahim O.” to “IE S.”

    Changed Status to “Not reproducible”

  • As we have not received further information on how to repro this item of feedback - we will resolve it as not repro. Should you have the details needed in order for us to reproduce this problem in our test environments please feel free to reactivate this issue at your earliest convenience.
    All the best,
    The MS Edge Team 

  • I’m using selenium 3.0.1 & microsoft webdriver supporting with OS build number but
    If i’ll trigger/run any job/build in microsoft edge browser from jenkins in a virtual machine(configured as one of the jenkins nodes) , then edge browser opens opens the url everytime when a test starts but doesnt work further means doesnt enter username /password etc & remains like that .

    and I also got 1 information that identifying an element by xpath is not working but identifying by id is working So if this happenning then Can anybody please help suggest something how we can run a java selenium test in edge browser without any issue…

    Please provide ur helpful suggestions…
    Thank you.

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

Sign in