Performing few steps again if condition met

Best practices, code snippets for common functionality, examples, and guidelines.
dARKTOILET
Posts: 4
Joined: Tue May 09, 2017 8:56 am

Performing few steps again if condition met

Post by dARKTOILET » Wed May 10, 2017 1:42 pm

Hi Ranorex Team,
unfortunately me again.

Our application while creating new request sometimes (1 out of 10-20 times) shows popup window with error and button "close".
It is fixable from programmer point of view but fixing this would cost company a lot of money so decision is to go with it :evil: .

Story starts here where I have to create automation tests. Maybe I could wait for that window and invoke ensure visiblity and then press "close" button on that window.
The main problem here is that; Whenever this window pops up some action is not saved and I need to go back 3 steps in that particular test case to perform them again (these 3 steps).

My question: Is there any way in Ranorex to do that? To force Ranorex of knowing when this window pops up to click "close" button and go back 3 steps and perform them again :?:

Thanks for any help,
and sorry for long post :twisted:

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

Re: Performing few steps again if condition met

Post by odklizec » Wed May 10, 2017 2:04 pm

Hi,

I'm afraid, there is no easy (if any) way to do that. While reading your post, my first thought was "popup window handler", which would solve your problem with randomly appearing window. The problem is, that because the popup handler actually runs in a separate thread, there is (currently) no way to talk to the main thread, nor even pause the execution of main thread. Which means, popup handler would happily click "close" button, but in a meantime, Ranorex will continue with main test execution. Which means, it may eventually fail. And no, there is currently no way to tell Ranorex to go back few steps.
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

dARKTOILET
Posts: 4
Joined: Tue May 09, 2017 8:56 am

Re: Performing few steps again if condition met

Post by dARKTOILET » Wed May 10, 2017 2:26 pm

Thank you Odklizec..
appreciate it.