jsmiley
15 years agoOccasional Contributor
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?
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?