Make "Wait for exist" action for Web more robust
At the moment when I click on web element that causes load of a new or reload of an existing page and I want to validate/make use of web elements on that page I need to make sure that those elements exits in DOM. I do that using "Wait for exist [web element]" action. The problem is that "wait for exist" does not always work reliably in that case returning true when web element is not fully load or accessible yet as part of DOM. To work around that I have to precede "wait for exist" action with "Delay" action allowing DOM to load enough so "wait for exist" can reliably work.
Could you please improve "wait for exist" action to be reliably used on Web page load so I do not need to precede it static timeout using Delay?
Thank you for your input.
However, the exact ways of how “WaitFor” interacts with a web page differ extremely. We always want to improve our existing functionality, especially since we know that these issues can get extremely annoying.
However, there is no “general approach” that we can take to tackle this issue, it can’t be a “feature” for us.
If you have actual examples of web pages where a WaitFor doesn’t work as intended, please reach out to our support team. If you can provide us with enough information (usually access to your web application) that we can analyze the issue, we will be very happy to do so and to find a solution for this actual problem.
So, if you have said issues, please reach out to our support team, and we will very likely do a bug fix for that.
The Ranorex Product Management Team
I will add to this request the chance to wait for element to be clickeable as selenium does. Many times I need to perform a work around to solve this kind of issues when you wait for an item it is visible or exists and Ranorex start working with it and it's still on load process
Marcel Keller commented
I have the same problem and reported it to the Ranorex Support ([CAS-20054-D9Z0Q9]). They confirmed that it is a bug in the Ranorex Plugin.
Pavel Kudrys commented
Have you tried to add InvokeAction >> WaitForDocumentLoaded before the WaitForExists action/method? Simply drag&drop the DOM element to recording of your choice (as a very first action) and then from the appeared menu select InvokeAction >> WaitForDocumentLoaded (with or without timeout). I'm using it rather frequently in my tests and it works quite well with our web apps.