Hi , I just started using ranorex yesterday and have a question on how to setup the logic to perform the following.
Consider the following flow:
1. Search for customer
Enter customer name in customer field
Search
2. a. If row returned , dblclick row
b. if no row returned, Click Close button and continue to iterate to next search value( return to step 1)
Does anyone have a code snippet to handle this type of flow which is probably a common flow?
Can this be handled by the validation function or does it need to be user code? What is the raborex best practice for handling this type of scenario ?
Handling validation condition
Handling validation condition
Last edited by davilo61 on Wed Jun 04, 2014 2:26 pm, edited 1 time in total.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Handing validation condition
Hi,
In order to be able to recommend a way to handle the described situation we need to know what you want to check. In what situation should the test be marked as passed and in what situation as failed?
Do you want to log if the row is empty respectively doesn't exist?
Should the test handle these two situations in the same way, so just by performing the further steps?
Do you prefer to write User Code or do you prefer to work with Recordings?
Regards,
Markus
In order to be able to recommend a way to handle the described situation we need to know what you want to check. In what situation should the test be marked as passed and in what situation as failed?
Do you want to log if the row is empty respectively doesn't exist?
Should the test handle these two situations in the same way, so just by performing the further steps?
Do you prefer to write User Code or do you prefer to work with Recordings?
Regards,
Markus
Re: Handling validation condition
Hello,
I want to check simply for the existence of a row returned by a search. If no row is returned, I want to close window and continue search.
1. Search by identification number for example
1. Enter id number 12345
2. Search
3. Nothing returned
4. Close window and iteration to next number 12346 for example (repeat step 1)
I'm sure there are several methods to use but wanted to know the best practice. I would probably want to log the missing value using validation. Nothing returned for 12345 .
I want to check simply for the existence of a row returned by a search. If no row is returned, I want to close window and continue search.
1. Search by identification number for example
1. Enter id number 12345
2. Search
3. Nothing returned
4. Close window and iteration to next number 12346 for example (repeat step 1)
I'm sure there are several methods to use but wanted to know the best practice. I would probably want to log the missing value using validation. Nothing returned for 12345 .
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Handling validation condition
Hello,
When you know which id numbers to use I would just create a Test Case with a data source using the ids and a recording.
There you can for instance use an User Code action to distinguish whether a customer exists or not.
In generally you should design your tests without a logic since it is not so easy to read for others when you created condition based tests.
By the way what should happen when a row is returned?
Regards,
Markus
When you know which id numbers to use I would just create a Test Case with a data source using the ids and a recording.
There you can for instance use an User Code action to distinguish whether a customer exists or not.
In generally you should design your tests without a logic since it is not so easy to read for others when you created condition based tests.
By the way what should happen when a row is returned?
Regards,
Markus