Forum Discussion
AlexKaras
12 years agoChampion Level 3
Hi,
TestComplete tries to wait until the page is loaded if you use ToUrl() method.
If you click some element, TestComplete executes the click method and it is yours responsibility to wait for the click results and page refresh.
I saw your message in another thread where you consider this to be an issue. But on my opinion this is a highly argueable statement.
The case is that you can require the test tool to wait until the page is loaded after the link is clicked only if: a) you are clicking the link that navigates to some other page and b) the target page is a static one.
If the above conditions are not met, a great many of other scenarios are possible. For example, the link can just trigger some script, but not navigate to another address, or the page may contain AJAX code that causes page to change its content without been actually reloaded, etc.
In all these cases there is no other criteria (unless your developers implement it explicitly) to determine if the click operation have completed or not but to wait until the expected page or its element appear within some predefined timeout.
It is only you who knows what should happen after some element on the page is clicked. That is why it is your responsibility to implement the test code so it waits for the expected element and proceed accordingly.
TestComplete tries to wait until the page is loaded if you use ToUrl() method.
If you click some element, TestComplete executes the click method and it is yours responsibility to wait for the click results and page refresh.
I saw your message in another thread where you consider this to be an issue. But on my opinion this is a highly argueable statement.
The case is that you can require the test tool to wait until the page is loaded after the link is clicked only if: a) you are clicking the link that navigates to some other page and b) the target page is a static one.
If the above conditions are not met, a great many of other scenarios are possible. For example, the link can just trigger some script, but not navigate to another address, or the page may contain AJAX code that causes page to change its content without been actually reloaded, etc.
In all these cases there is no other criteria (unless your developers implement it explicitly) to determine if the click operation have completed or not but to wait until the expected page or its element appear within some predefined timeout.
It is only you who knows what should happen after some element on the page is clicked. That is why it is your responsibility to implement the test code so it waits for the expected element and proceed accordingly.
Related Content
Recent Discussions
- 3 days ago