Conditional test steps without user code

Best practices, code snippets for common functionality, examples, and guidelines.
andrei_t
Posts: 5
Joined: Thu Mar 26, 2015 2:01 pm

Conditional test steps without user code

Post by andrei_t » Tue Apr 14, 2015 10:13 am

Is there a way to run specific test steps only when a variable meets a defined condition?
Case in point, we currently employ a data binding with a variable for the different browsers. The SETUP starts the browser and then we have catch-all steps to deal with the ssl certificate messages for all browsers which naturally wasted a lot of time because only 1-2 steps are actually executed (in each test case).

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

Re: Conditional test steps without user code

Post by odklizec » Tue Apr 14, 2015 11:22 am

Hi,

Basically, there is no way to conditionally execute test steps without using user code. Is there any particular reason why you want to avoid user code? It should be relative easy to create user code to do what you want.

Do you have all steps in one recording? Any chance you could share the project or at least show us the recording in question?
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

andrei_t
Posts: 5
Joined: Thu Mar 26, 2015 2:01 pm

Re: Conditional test steps without user code

Post by andrei_t » Tue Apr 14, 2015 2:20 pm

The only reason is to keep things as simple and tool-assisted as possible. I would imagine that such a feature (namely an expression needs to be true for a step to be executed) should be rather simple to implement and would help the readability of the test cases greatly.

Anyway, thanks for the quick reply, I guess we will have to resort to user code then.