Forum Discussion

socaltester's avatar
socaltester
Contributor
7 years ago
Solved

Unable to Click Dynamic Button Link on Refreshing Page

Windows: 10 TestComplete Web: 12.42 Firefox: 52.0.1   I'm experiencing difficulty in writing a Keyword test to click on a link located on dynamic page that refreshes every 15 seconds. In this exa...
  • AlexKaras's avatar
    7 years ago

    Hi,

     

    First of all, the link provided by Marsha_R is definitely worth reading if you haven't already did that.

    Then:

    > I'm experiencing difficulty

    What exactly?

     

    > Can someone assist?

    Quite probably. What assistance you are looking for?

     

    > Keyword test to click on a link

    Can you provide a screenshot of your test?

     

    Without answers to the above questions, I am guessing two possible options:

    a) The target link is not (stably) identified. This can be solved, for example, by proper NameMapping as per the link provided by Marsha and this video: https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ (from the https://support.smartbear.com/screencasts/testcomplete/ page);

     

    b) The link is identified but is lost after the page refresh because the internal content of the page is generated a-new. In this case you should not store the reference to the once found link, but search for the link just before you need to click it and click immediately. However, there is still a chance that the link will be regenerated before the click action, so, in order to improve test stability and if page refresh is not an absolute requirement for this case, I would recommend to either disable it at all or to make its frequency as low as possible.