Forum Discussion

Ilakkk's avatar
Ilakkk
Contributor
2 years ago

Re : Browser Navigation

Hi team, how to navigate a browser in a single tab, for example if we are hitting the login page or search page it will navigate to another page know I want come back to the previous home page now how to do that is a mystery in test complete, I can't find in a documentary or maybe I will missed that. Let me know the possibility
Note: the link has been changed multiple times in a script so I can't use ToUrl() method also.
If multiple tab means we can use control shift tab, but it a single tab

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If you're working with Chrome, add the WndClass name to MSAA, in your project settings,

    TC will then expose the following details,

    You can then access the tabs via the following code,

    function Test10()
    {
        NameMapping.Sys.Browser().Form("Google - Google Chrome").Pane("Google Chrome").Pane(0).Pane(1).Pane(0).TabList(0).Pane(0).Pane(0).PageTab("Google").Click();
        aqUtils.Delay(1000);
        
        NameMapping.Sys.Browser().Form("Google - Google Chrome").Pane("Google Chrome").Pane(0).Pane(1).Pane(0).TabList(0).Pane(0).Pane(0).PageTab("Google", 2).Click();
        aqUtils.Delay(1000);
        
        NameMapping.Sys.Browser().Form("Google - Google Chrome").Pane("Google Chrome").Pane(0).Pane(1).Pane(0).TabList(0).Pane(0).Pane(0).PageTab("Google", 3).Click();
        aqUtils.Delay(1000);
    }
    • Ilakkk's avatar
      Ilakkk
      Contributor

      Hey, which details!!!!

      my script will execute in all the browsers installed in the system on that case what can I do.

      Give me a best solution yeah.

      Many Thanks

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I'm having difficulty posting images due to the following error,

    Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied.

    You need to add your browser WndClass name to MSAA (Project Settings -> Properties -> Open Applications -> MSAA). When you look at Object Browser, you will see that TC has exposed your browser UI controls. Look for PageTab name, you can then use this in your script