beginner's question

Ask general questions here.
justletmesignup
Posts: 8
Joined: Fri Jul 03, 2015 8:13 pm

beginner's question

Post by justletmesignup » Fri Jul 03, 2015 8:17 pm

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

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: beginner's question

Post by CookieMonster » Mon Jul 06, 2015 7:34 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: beginner's question

Post by odklizec » Mon Jul 06, 2015 7:56 am

Hi,

As Dan already suggested, you can add Delay action from Add New Action combo...
Delay.png
Delay.png (15.13 KiB) Viewed 898 times
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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: beginner's question

Post by CookieMonster » Mon Jul 06, 2015 3:21 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: beginner's question

Post by odklizec » Mon Jul 06, 2015 4:10 pm

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 ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

justletmesignup
Posts: 8
Joined: Fri Jul 03, 2015 8:13 pm

Re: beginner's question

Post by justletmesignup » Thu Jul 07, 2016 9:51 pm

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,