Hi Team,
I want to execute certain recording modules based on the conditions, i.e. if type = "CityPair" then execute Add_CityPair_Profile.rxrec but if type = "Seasonal" then execute Add_Seasonal_Profile.rxrec. Both recorders have there own Db source(Excel) to get data from (using Data driven approach). [See attached RX.png snapshot]
But problem I am facing is that in Data Source I am not able to define separate Db source for both of recording modules. If I try to do so, it overwrites the other one.
So kindly let me know, how can we different Db. sources for different recording modules ??
Attached the snapshot of User code(UserCode.png), I am using to call different recording modules, kindly let me know if it need any correction!
Thanks,
Varun.
Can't able to assign different Db source to different module
Can't able to assign different Db source to different module
- Attachments
-
- RX.png (52.09 KiB) Viewed 1348 times
-
- UserCode
- UserCode.png (39.55 KiB) Viewed 1348 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Can't able to assign different Db source to different module
Hi Varun,
You are right. It's not possible to use more than one DataConnector in a testcase.
But what you can do is the following. Pack each of the recordings which should have their own data connector into a single testcase (see screenshot). This should solve your problem.
Regards,
Larissa
Ranorex Support Team
You are right. It's not possible to use more than one DataConnector in a testcase.
But what you can do is the following. Pack each of the recordings which should have their own data connector into a single testcase (see screenshot). This should solve your problem.
Regards,
Larissa
Ranorex Support Team
Re: Can't able to assign different Db source to different module
Hi Larissa,
Thanks for your kind Support! It really works by defining Data Connector as per Test Cases.
Now my concern is, on executing Test Scenario I am getting Errors which you can see in attached Snapshot. Please go through it and let me know the solution for this.
Thanks,
Varun.
Thanks for your kind Support! It really works by defining Data Connector as per Test Cases.
Now my concern is, on executing Test Scenario I am getting Errors which you can see in attached Snapshot. Please go through it and let me know the solution for this.
Thanks,
Varun.
- Attachments
-
- RX_Errors.png (41.09 KiB) Viewed 1339 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Can't able to assign different Db source to different module
Hi,
Yeah, this is an easy one. Think you forgot two semicolons ( ; ).
Regards,
Larissa
Ranorex Support Team
Yeah, this is an easy one. Think you forgot two semicolons ( ; ).
Regards,
Larissa
Ranorex Support Team
Re: Can't able to assign different Db source to different module
Hi Larissa,
Your Guidance helping us a lot, Thanks again!
I have a rough draft for the logic I have applied to execute automation queries which you can get in attached text file. Please look into it and get me resolved from following issue -
After executing record1.rxrec, tool always executes condition for "City Pair" for 'n' number of times(if records are of 'n' count in excel) and then it executes condition for "Seasonal" for it's 'm' count(it's data also retrieved from excel).
Note: I am using separate excel for Profile Type field and it should execute conditions based on values in that file.
What I want is, Tool must execute conditions based on the value in excel(for Profile Type) and after executing each condition successfully, it should start again from record1.rxrec.
WR,
Varun.
Your Guidance helping us a lot, Thanks again!

I have a rough draft for the logic I have applied to execute automation queries which you can get in attached text file. Please look into it and get me resolved from following issue -
After executing record1.rxrec, tool always executes condition for "City Pair" for 'n' number of times(if records are of 'n' count in excel) and then it executes condition for "Seasonal" for it's 'm' count(it's data also retrieved from excel).
Note: I am using separate excel for Profile Type field and it should execute conditions based on values in that file.
What I want is, Tool must execute conditions based on the value in excel(for Profile Type) and after executing each condition successfully, it should start again from record1.rxrec.
WR,
Varun.
- Attachments
-
RX_Condition.txt
- RX_Conditions
- (645 Bytes) Downloaded 194 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Can't able to assign different Db source to different module
Hi Varun,
I think you will like following code-snipped:
Larissa
Ranorex Support Team
I think you will like following code-snipped:
Ranorex.Core.Testing.TestCase MyOptionalTC_Seasonal = (Ranorex.Core.Testing.TestCase) Ranorex.Core.Testing.TestSuite.Current.GetTestCase("TC_AddSeasonalProfile"); Ranorex.Core.Testing.TestCase MyOptionalTC_City = (Ranorex.Core.Testing.TestCase) Ranorex.Core.Testing.TestSuite.Current.GetTestCase("TC_AddCityPairProfile"); if(profile_type=="a") { MyOptionalTC_Seasonal.Checked=false; MyOptionalTC_City.Checked=true; MyOptionalTC_City.Run(null, false); } else if(profile_type=="b") { MyOptionalTC_Seasonal.Checked=true; MyOptionalTC_City.Checked=false; MyOptionalTC_Seasonal.Run(null,false); } else{ Report.Info("Sorry:","wrong type"); }Kind Regards,
Larissa
Ranorex Support Team