Can QTP recognize whether a page is loaded recently or not
I have a scenario explained below which I want to automate using QTP.
User select a selection criteria from the drop down box and obtains a resultset which contains a list of rows.Now the User navigates to some other page by clicking on the link present in the resultset.
If the User comes back again to the same screen, the same resultset is maintained as it is a functionality developed by developers.
The problem arises when user selects another search criteria from the result set and clicks on Search button.When user does another search based on the new criteria, the new result set should get loaded. But when I am doing the above actions using QTP , I am not able to obtain the new result set even if the user searches for the new criteria. The old result set is just maintained and QTP does the remaining actions with the old result set instead of the new one. I am not able to see the Loading icon of the new resultset when new criteria is selected.
Please provide a solution on how to resolve the above problem.
Is the UI showing the new result set and QTP is not recognizing it? - Maybe a .RefreshObject call to fix.
Are you using a Find() operation to get those elements are a object map?
If you're using an objectmap, a force refresh is needed to get the object map indexes up to date. If it's a find operation, then you might have a situation where elements are being hidden instead of being removed from the search results. (so old objects are still in memory)
I tried with .RefreshObject function to refresh the result set obtained. But then also, the new result set is not displayed. I have use8d t7e fireevent function for double clicking the Search button.And when I am running the script in debugging mode, I can see that QTP is clicking on the Search button. But the new search results are not getting displayed. Plesae provide a solution for the same.
Even after using the .RefreshObject function or change ReplayType to mouse/keyboard emulation ,the new result set is not displayed in the screen even if the QTP clicks on Search button. Please let me know solution for the above problem.