Page 1 of 1

Want to drive RX as per selected options available in app.

Posted: Thu Sep 13, 2012 12:05 pm
by varun
Hi Support,

We have Web Application.
I am stuck in a case where I have to drive RX by Data Source(Data Driven testing) for a condition as below -

Field1 has some options say A, B, C in combo box. Depending on the selected option, further fields will appear. Suppose I select option A then Check-box appears. If user selects checkbox then two Radio buttons say r1 & r2 becomes enable and user have to select any one from them.

I recorded each scenario as stated above. But while testing scenarios, if I leave value for Checkbox 'blank' in Excel then RX fails the case.
What I want is to skip execution of such elements for which data is not provided in data source(excel). How can I achieve this??
If it needs a scripting then please let me know the code snippet along with info that how can I use scripting in my recorded scenario?

Thanks & Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Fri Sep 14, 2012 10:30 am
by varun
Hi Support Team,

Please provide me solution for this post, I have to automate the scenario but facing hurdles as new to RX & scripting.

Looking for your response.

Thanks & Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Fri Sep 14, 2012 3:18 pm
by Support Team
Hi,

You can place a UserCode method in the setup region of your test case where you can check if the value is set to the specific value and then you can force the iteration to fail:
Validate.IsFalse(true);
, but please keep in mind that you have to set the "Error Behavior" of this test case to "Continue with iteration".

Regards,
Markus
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Wed Sep 19, 2012 12:57 pm
by varun
Hi Markus,

Thanks for your feedback.
Purpose solved by activating option "Enable Continue on Fail" for the related steps but now concern is that by this way it takes more time to finish up with Test Case, it waits for a minute on steps for which 'Enable Continue on Fail is Enabled'.

My other concern is, for a module I recorded 4 test cases in order- T1, T2, T3 & T4. I recorded T4 at last and now required to execute them in order T4, T1, T2, T3. I tried by drag dropping but it didn't work. Can I have solution for this also?

Thanks & Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Thu Sep 20, 2012 3:11 pm
by Support Team
Hello Varun,

Which action is used where you activated "Enable Continue on Fail"? Could it be that an element cannot be found? Did you check the search timeout of the element in the Repository?

Regarding the order of the test cases. What exactly doesn't work? For example, if test case T4 has dependencies to test case T3 and you change the order of the test case it will not work. Please give us more information about you issue.

Regards,
Bernhard
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Fri Sep 21, 2012 7:53 am
by varun
Hi Bernhard,

"Mouse" action is used for the steps on which 'Enable Continue on Fail' is activated. I am using this option for selecting Check-box and Radio options. Earlier RX fails and stop executing further, if there values(Check-box & radio option) are not provided in excel but now after activating 'Enable Continue on Fail', it waits for a minute for each such such step for which value is not provided in Excel and then continues with next step.

Talking about test cases, there is no dependency of Test Cases. Thing is, I recorded Login functionality at last (in Test Case T4), so its appearing last in hierarchy. And so T4 is executing at last, which should execute first in order T4,T1, T2 & T3.

Let me know if further information required.

Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Fri Sep 21, 2012 3:18 pm
by Support Team
Hello Varun,

Please check the search timeout of the element you want to click in the repository. Please read the section Repository Items Properties in our User Guide.

Regarding the test case order: Did you use 'Run an Application' in your first TestCase to open the AUT. Could it be that the application isn't started when you start test case 4?

Regards,
Bernhard
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Mon Sep 24, 2012 6:43 am
by varun
Hi Bernhard,

Thanks for your Feedback.
For first point, I tried to look for search timeout but Properties window didn't appeared in RX. PFA snapshot for this. I clicked on Properties option in right context menu and also in View menu. But nothing works.

And for 'Run an Application', are you talking about the Action which we use to run application again ? Please give me more information about this.

Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Mon Sep 24, 2012 9:14 am
by odklizec
Hi Varun,

Try "Reset to Defaults" option, which should reset the RX GUI back to its default state (with visible Properties)...
ResetToDefaults.PNG

Re: Want to drive RX as per selected options available in app.

Posted: Tue Sep 25, 2012 3:47 pm
by Support Team
Hello Varun,

Maybe the application is not started or in a wrong state for the tests in test case 4. Please make sure that your application is started and in the right state.

Did odklizec suggestion help to access the properties window?

Regards,
Bernahrd
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Wed Sep 26, 2012 6:10 am
by varun
Hi Bernhard,

Yes, I am able to check Properties window as per odklizec guidelines. Thanks to him.

For Test Case 4, I don't think application is not started or started in wrong state. Because TC4 executes well individually. Problem is when I want to execute all test cases with condition that TC4 should executes first and then continue with other test cases, as stated in earlier replies.

And I am looking for your feedback on my one of earlier reply ->
"And for 'Run an Application', are you talking about the Action which we use to run application again ? Please give me more information about this."

Thanks & Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Thu Sep 27, 2012 10:21 am
by Support Team
Hello Varun,

It is not necessary to start your application twice if it is running and in the right state. Is it possible for you to give us a small example (project), which i can run on my machine to reproduce your issue?
Thank you!

Regards,
Bernhard
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Fri Oct 05, 2012 5:46 am
by varun
Hi Support,

I can't provide you any example from project, sorry for that !
But I can make you understand by clearing exact scenario to you. Case is, I recorded four Test Cases in order TC1, TC2, TC3 & TC4. So currently execution order is TC1->TC2->TC3->TC4.
Test Cases from TC1 to TC3 covers functional scenarios and test case TC4 has recording of Login to application.

While finalizing, I want login functionality(TC4) to execute first and then the rest of test cases, i.e. in execution order: TC4->TC1->TC2->TC3.

Please let me know, how can I achieve this?

Thanks & Regards,
Varun.

Re: Want to drive RX as per selected options available in app.

Posted: Fri Oct 05, 2012 2:14 pm
by Support Team
Hello Varun,

Could you please explain how you made you first recording in TC4?
How and when do you open your application? Is the application opened in each test case separately or is your application opened only in the first test case?
Please try to make a new test case independent of the others where you open the login page of your website within the first recording.
OpenWebsite.png
Place the new test case now at the top of your test suite.
Does it work if you do so? If not, is it possible to give us an example solution with another application (e.g. windows calculator or Ranorex website) to explain your issue?

Regards,
Bernhard
Ranorex Support Team

Re: Want to drive RX as per selected options available in app.

Posted: Mon Oct 08, 2012 8:38 am
by varun
Hi Bernhard,

Thanks for your feedback!
It's working now. I find the solution while recording sample record for you.
Will let you know if face any problem in future while executing test scenarios. Thanks again.

WR,
Varun.