Forum Discussion

NisHera's avatar
NisHera
Valued Contributor
11 years ago

Navigation Object in multiple web pages

Hi,

While writing tests for web application.

Found that same navigetor object visible almost all the pages.



Rather than mapping same object in deferent pages...

Is there any other way to handle this ...?



I have written windows application test scripts but new for web. 
  • I achieve this through using Aliases.



    In the Alias tree for the website I was last working on I have:





    • 1 entry for each page with controls specific to these pages contained below them


    • 1 "global" page which uses a heavily cut-down and wildcarded version of the URL (so it will be found no matter what page the site is on) and all the common object below it




    Then the "global" controls (search boxes, side menus, etc etc .... things which persist throughout the site) can be called anywhere and they'll work.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Nishnatha,

     


    Even if the object persists on each page, it can be located on a different hierarchy level in the object tree.


    You can try using the Extended Search Criteria in Name Mapping, but I don't see a lot of sense in this.


     

  • I achieve this through using Aliases.



    In the Alias tree for the website I was last working on I have:





    • 1 entry for each page with controls specific to these pages contained below them


    • 1 "global" page which uses a heavily cut-down and wildcarded version of the URL (so it will be found no matter what page the site is on) and all the common object below it




    Then the "global" controls (search boxes, side menus, etc etc .... things which persist throughout the site) can be called anywhere and they'll work.