Add element to specific page while recording

2 posts, 0 answers
  1. Elliot
    Elliot avatar
    1 posts
    Member since:
    Mar 2015

    Posted 01 Jul 2015 Link to this post

    Is there any way I can decide under which Page of Element Explorer the recorded element should be placed when I explicitly add to element repository during recording. 

    In My Case the Application Under Test URL changes as version changes so if i already have some elements present for one AUT page and when i want to add new elements to same page while recording on new version of AUT(app under test), it creates new Page under Element Explorer.

    Why I need to achieve this is because when I refer to these elements in Coded steps using Pages.XYZ.Element1 pattern I need to remember multiple Pages of element explorer even though they contains locators of a single AUT page.

    Please suggest possible solution to this.




  2. Ivaylo
    Ivaylo avatar
    782 posts

    Posted 03 Jul 2015 Link to this post

    Hello Elliot,

    Unfortunately you cannot specify explicitly under which Page the elements should be placed and this is on of the limitations of Test Studio and one disadvantage when using a coded step. If the page change you should edit the code manually to correspond to the new page otherwise you'll be getting compilation errors.
    The only way to proceed here is to use a partial URL, that does not contain dynamic part (the version) and this way all the elements will be recorded under the same page and no new pages will be generated. In case you have multiple pages you can also try merging the pages as shown in this article. If you decide merging pages please make sure you have  a backup of your project in order to prevent breaking a working project.

    Thank you for your understanding.

    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top