Create function for wait for visible and wait for not visible
We are testing a software in a browser that sometimes need time to load data. When loading a message is shown. The problem is that the tag is always there only the visible status changes. So it would be great to have a funktion like 'wait for not exist' also for 'wait for not visible'.
Thanks again for your input. We have implemented this feature and you can be among the first to try it out with our next Ranorex Beta release. If you would like to join the Ranorex Beta Program, please head over to http://www.ranorex.com/ranorex-beta-program.html
Ranorex Product Management Team
Could someone from Ranorex provide here a usage example (a code snippet) of implemented feature?
I agree with Larissa, setting up a bunch of repo items just to have "all" variations of "visible", "enabled",... to be matched with waitforexists as Pavel suggested won't be maintainable with hundreds of items that we already have
I would prefer expanding the WaitFor action with all of the validation options. It should be easy to wrap the instant validation check in a while loop with a timeout. It is common for me to have to add a function or custom repository item to wait for a given validation condition before adding a second action to do the actual validation for the purposes of showing management the comforting green glow of a successful test case, particularly for image validations.
Pavel Kudrys commented
This is already doable with existing Ranorex tools, and I think current approach is much more flexible than adding new single-purpose methods. For example, WaitForVisible can be achieved by adding "and @visible='true'" attribute to the repo element xpath, and then by using WaitForExists/NotExists you can instruct Ranorex to wait for visibility/invisibility of a given element. The same can be done with any other available attribute. A you can see, it's much more flexible than new WaitForVisible method.
I would very appreciate a general "Wait For Attribute Change" feature.
Otherwise I may need several repository items (with differnet attributes) wich bascially all mean the same element. (e.g. @visible='True', @enabled='False', ...)
In our application, sometimes we have to wait for some item to be visible or not to be visible after performing some action. So it would be great if you add more functions to the UIAdapter such as WaitForVisible(elementName, timeout, status, exception), similarly many more can be added in-house to make the life of automation engineer easy and hence would be much recommended.
Pavel Kudrys commented
You can do this already with WaitForNotExists action/method! Just add @visible='True' attribute to the xpath of given repository element. Hope this helps?