Record Delays

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm

Record Delays

Post by MB_wiko » Fri Sep 09, 2016 1:15 pm

I'm new with Ranorex and I didn't find an answer in this forum and on website of ranorex. Perhaps you can help me:

We test a webapplication with Ranorex. In different forms we have a waiting time about 0,5s for loading lists and form elements. In this case Ranorex stops the test (test failed). At the moment I insert manually delays in the recording code. This costs many time. Perhaps it is possible to recored with Ranorex with delays. Example: I record some process and I still wait during recording about 1s for loading a list. When I replay the recoreded test case the replay should also wait 1s for loading the list. Is this possible in Ranorex?

The turbo mode is not activated, when I replay the test cases.

Thanks a lot for your answers in advnce.

Best regards

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

Re: Record Delays

Post by odklizec » Mon Sep 12, 2016 4:04 pm


Using hardcoded delays in test automation is a not very good idea, especially when testing web-based apps. The way better option is to use WaitForExists/NotExists actions. These, if properly used, allow to eliminate most (if not all) hardcoded delays. You see, with web apps, you can never bee 100% sure the loading of page will not be delayed from time to time due to temporary network speed issue. So even if you manually set some delays here or there, our test may eventually fail here or there, due to unexpected network delay. Hence using WaitForExists/NotExists is much better option.
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