Forum Discussion

VegasQA's avatar
VegasQA
Contributor
10 years ago

Multiple Definitions for Same Page Properties

Hey all,



I'm scripting for an app which allows you to hit the same pages in different ways.  Each way you hit it might create field defaults which the other ways do not.  My problem is TC throws me an error when it loads a page from different ways.



For example, there's a Course Name field on the Registration screen.  If the Registration 

screen is loaded through direct menu navigation, the Course Name field is set to null.  If, however, you arrived at the Registration screen via a link from the Course Creation screen, the Course Name field is populated with the relevant Course and TC sees this as an error.



TC seems to be unable to recognize the page is the same page because the properties of one of the fields differs.  



How do I get TC to recognize "This is the same page, don't worry about that field's current value."?



Thanks in advance!

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    We have some fields that change state as the page loads, so TC may encounter it as a text box or a combo box at different times, so even though the same entry needs to be made, we have to have two definitions.  See the attached screenshot.  This seemed to be the most straightforward way for us to handle it.



    In your case, you could check whatever state changes when your field is empty or not empty and proceed appropriately.