Hi ,
I have a query on data driven test. I am using the Sample VIP application . I hae created two recordings.
1. For Starting the VIP Applicaiton
2. Adding records into it.
For Adding records, I have used data driven with the help of simple data sheet. There are three rows of input data in the datasheet.
while running , for each iteration, Ranorex is opening a new VIP application where as I would like Ranorex is to open the application once & all the three rows of data should be added.
Please help us on this.
Thanks,
Bibhu
Query on Parameterization
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Query on Parameterization
Hi,
The key is to use a test case in a test case. The code where you start the program has to be located into a separate test case and then you have to add a new test case to the "parent" test case, then it will work.
Regards,
Markus
Ranorex Support Team
If you take a look at the sample "VIPTestSuite", especially at the "CheckValues" test case, then you will see that this works as you have written.I would like Ranorex is to open the application once & all the three rows of data should be added.
The key is to use a test case in a test case. The code where you start the program has to be located into a separate test case and then you have to add a new test case to the "parent" test case, then it will work.
Regards,
Markus
Ranorex Support Team
Re: can we create our own valiation script ?
Hi,
Can I write my own validation code in Ranorex ?
also
Can you send the code snippet(C#) for validating text size of 'First Name' text box.
Thanks.
Bibhu
Can I write my own validation code in Ranorex ?
also
Can you send the code snippet(C#) for validating text size of 'First Name' text box.
Thanks.
Bibhu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Query on Parameterization
Hi,
Regards,
Peter
Ranorex Team
If you don't know the code to write for a specific action, just create that action with the Ranorex Recorder and have a look at the code the recorder generates.bibhu wrote:Can I write my own validation code in Ranorex ?
Regards,
Peter
Ranorex Team
Re: Query on Parameterization
Hi Peter,
Thanks for the info. However we cannot make any validation through recording.
For example - for the Sample VIP application -
Lets say I have a scenario such as the First Name field should not accept aplhanumeric characters.
Could you please provide me the code for this ?
Thanks,
Bibhu
Thanks for the info. However we cannot make any validation through recording.
For example - for the Sample VIP application -
Lets say I have a scenario such as the First Name field should not accept aplhanumeric characters.
Could you please provide me the code for this ?
Thanks,
Bibhu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Query on Parameterization
Hi,
to make a validation on - as you mentioned - not alphanumeric characters you can work with the regular expression "\W" which matches on not alphanumeric characters.
To do so you can either add a validation step to your recording and choose "AttributeRegExpr" for method and "\W" as match value, or you can use following code snippet:
http://www.ranorex.com/support/user-gui ... xpath.html
http://msdn.microsoft.com/en-us/library/az24scfc.aspx
Regards,
Tobias
Support Team
to make a validation on - as you mentioned - not alphanumeric characters you can work with the regular expression "\W" which matches on not alphanumeric characters.
To do so you can either add a validation step to your recording and choose "AttributeRegExpr" for method and "\W" as match value, or you can use following code snippet:
Validate.Attribute(repo.VipApp.InputFields.FirstNameInfo, "Text", new Regex("\\W"));For more details about regular expressions please have a look at following links:
http://www.ranorex.com/support/user-gui ... xpath.html
http://msdn.microsoft.com/en-us/library/az24scfc.aspx
Regards,
Tobias
Support Team