Page 1 of 1

beginner's question

Posted: Fri Jul 03, 2015 8:17 pm
by justletmesignup
hi all,

this is probably a super easy question that requires a 1 second fix. however i've searched for the last half-hour on Google and can't find a solution to this.

- i've tried adding an action that waits
- i've tried using @validate and @enabled

basically i'm evaluating Ranorex right now and i'm stuck - i have a step in the recording that Ranorex just keeps failing on because it tries to look for that validation right after the previous action that just occurred. how do i get Ranorex to wait 1 minute before attempting the verification step?

please and thanks,
B

Re: beginner's question

Posted: Mon Jul 06, 2015 7:34 am
by CookieMonster
Hi B,

It is a bit hard to help you accurately with the information you gave us.
We need to know the technology (Java, WPF...) of the application you want to automate, which version of Ranorex, Operating system....

May also a snapshot of your SUT, if possible, would help us to help you.

Kind Regards
Dan

May you can enter a delay of 1 min before your validation.

Re: beginner's question

Posted: Mon Jul 06, 2015 7:56 am
by odklizec
Hi,

As Dan already suggested, you can add Delay action from Add New Action combo...
Delay.png
However, in my opinion, its much better to use Wait For - Exists/NotExists action.

Delay waits specified amount of time, no matter if the element required for next action is already loaded or not. So this may add unnecessary delays to your tests and slow your tests. It could also cause failures if the element is still not loaded after the specified amount of time.

Wait for, on the other hand, waits until the specified element is not available or disappears. You can also define timeout, which make sure your test can continue even if the element in question is not found or does not disappear. You can find Wait For action in the same Add New Action combo.

Re: beginner's question

Posted: Mon Jul 06, 2015 3:21 pm
by CookieMonster
Hi,

I normally also use WaitForExists or WaitForNot. But sometimes I'm facing the problem, that the object is already there, visible in the background overlaying by a splash screen, then the "wait-for" starts to be tricky, especially if Ranorex is faster than the splash screen. :)
I'm facing this problems on Java applets and webpages using Ajax. Do you may have a solution for it? Because I also don't really like to use the delay action.


Regads
Dan

Re: beginner's question

Posted: Mon Jul 06, 2015 4:10 pm
by odklizec
Hi Dan,

Well, if the splash screen is the cause of problems, then you should use waitfornotexists for this splash screen, and then eventually add another waitforexists for the other element?

Another solution might be extending the xpath of waited object with some more attributes, like @enabled='true' (in case the element is already in GUI but disabled), @visible='true' (in case it's in GUI but hidden), etc. Simply, if some elements appear in GUI but they are not usable for some time (before something else is finished) you need to find an element in GUI that indicates the end of the previous process (progress bar, status bar text, etc...). But of course, there may be cases when using Delay is the easiest way ;)

Re: beginner's question

Posted: Thu Jul 07, 2016 9:51 pm
by justletmesignup
Hello all,

Thanks for your replies! I actually haven't been able to access the forums because I forgot my password thus I didn't reply to the thread. (Just recovered it today)

I thank you all for your suggestions and solutions. I ended up employing the 'Delay' feature. I will however, be looking into using the 'WaitFor' feature moving forward. There's still so much to learn and I appreciate the feedback I got for this question!

Cheers,