Forum Discussion

Paritosh's avatar
31 days ago

Cannot open new browser tab over remote desktop

Our test setup is used locally (in-person) as well as remotely over Windows Remote Desktop. We discovered a bug while executing locally created tests over a remote connection:

Test:

  1. Open browser (Chrome)
  2. Go to URL1
  3. <test steps on URL1>
  4. Open new browser tab in the same window
  5. Go to URL2
  6. <test steps on URL2>
  7. Switch back to URL1 on tab1
  8. <test steps on URL1>

This test was developed locally/in-person. If this test is executed locally/in-person, new tab is opened to navigate to URL2. But if this test executed over Remote Desktop, TestExecute navigates to URL2 in the same tab as URL1 without opening any new tabs. This causes the test to fail step7 onwards.  

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Regular Contributor

    To confirm your setup:
    1-PC1 with same version TestComplete and Browser, project open new tab and works as expected
    2-PC2 with same version TestComplete and Browser (could be VM)
    3-Copy project from PC1 to PC2
    4-Connect to PC2 using remote desktop and run project, project fails to open second tab and does not work as expected

    If you login to PC2 directly in person and run does it work as expected and only fail when you run in remote desktop?
    Are you using KeywordTests Script?
    What language the project is set to use, is it default JavaScript?
    It would help if you provide code sample, for example

    function Test1()
    {
      Browsers.Item(btChrome).Run();
      Browsers.Item(btChrome).Navigate("https://support.smartbear.com/testcomplete/docs/index.html");
      Aliases.browser.BrowserWindow.Keys("^t");
      Browsers.Item(btChrome).Navigate("https://support.smartbear.com/testcomplete/docs/general-info/index.html");
      Aliases.browser.BrowserWindow.Keys("^[Tab]");
      Aliases.browser.page1.Close();
      Aliases.browser.page2.Close();
    }

     

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      What version of TestExecute are you using, and can you provide the code that is not working please?