Forum Discussion

jsmiley's avatar
jsmiley
Occasional Contributor
15 years ago

Handling dynamic page loads through Keyword test interface

So I am writing a functional keyword test where I am checking to see if links are appearing on the screen and that clicking these links will take me to the correct page. Everyday the destination of the page will change, however, the link IDstr will always remain the same (allowing me to click the object). The problem I am having is that the WAIT command is looking for a page which is no longer in use. See my example below:





Example:



Day 1



Link 1 - Goes to page A

Link 2 - Goes to page B

Link 3 - Goes to page C



Test script will click link 1 during playback and waits for page A to load and page A loads. Test is successful.



Day 2



Link 1 - Goes to page D

Link 2 - Goes to page E

Link 3 - Goes to page F



Test script will click link 1 during playback and waits for page A to load but page D loads. Test fails because the wrong page is loading.







How do I make it so TestComplete waits for the right page to load? I tried using Variables but the keyword test recorder isn't letting me use a variable in the On-Screen Object selection screen. Is there a work around for this?

1 Reply

  • jsmiley's avatar
    jsmiley
    Occasional Contributor
    This is actually really easy.



    Just have to set the page value to "*" which means it will wait to load for any page.



    can make it the [baseURL]/* if you want to make it a bit fancier.