Hi Support,
In my application, we have 2 Radio options(say A & B) which are disabled by default but only gets enable if a check box say "CB1" is selected. By default, Radio "A" is selected from 2 radio options. I have recorded a scenario in which I manually select "B" radio option.
And now want it data driven with source from Excel file. But on executing test result, RX unable to drive radio buttons as per data in Excel. I am following steps as per Ranorex Tutorial, Please check page 15 of this document, I am not getting this window on my side. Could you please help to fix this problem?
Attached is the snapshot of RX Path Editor appearing at my end.
Also, please let me know how can I de-select the selected check-box through Data Driven.
Thanks and Regards,
Varun.
Want to drive Radio and Checkbox options w.r.t data in Excel
Want to drive Radio and Checkbox options w.r.t data in Excel
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Want to drive Radio and Checkbox options w.r.t data in Excel
Hi,
You can for instance check in UserCode if the value of a variable (which was set via the data connector) is set to a specific value, and if it is set to the value you have to perform a specific action, like clicking on the RadioButton A.
Regards,
Markus
Ranorex Support Team
You can for instance check in UserCode if the value of a variable (which was set via the data connector) is set to a specific value, and if it is set to the value you have to perform a specific action, like clicking on the RadioButton A.
Regards,
Markus
Ranorex Support Team
Re: Want to drive Radio and Checkbox options w.r.t data in Excel
Hi Markus,
Thanks for your feedback!
Is this the only solution for this problem as I think there could be another way also to achieve this. As I have only to make Radio buttons Data driven.
Please clarify.
Thanks & Regards,
Varun.
Thanks for your feedback!
Is this the only solution for this problem as I think there could be another way also to achieve this. As I have only to make Radio buttons Data driven.
Please clarify.
Thanks & Regards,
Varun.
Re: Want to drive Radio and Checkbox options w.r.t data in Excel
Hi Markus,
Please review the following code snippet I am executing, as per your previous reply. Still RX not working for Radio options and throwing 2 errors as in attached snapshot.
public void Mouse_Click_RblIsConstrained()
{
if(VarIsConstrained.Length > 0) // Check to verify whether value of variable is available in data source
{
if(VarIsConstrained == "Primary") // Check to verify value of variable(which was set via the data connector) is set to a specific value
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'MaintainResource.Primary' at 22;6.", repo.MaintainResource.PrimaryInfo);
repo.MaintainResource.Primary.Click("22;6"); // Performing specific action(mouse click on first radio option)
}
else
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'MaintainResource.RblIsConstrained' at 9;11.", repo.MaintainResource.RblIsConstrainedInfo);
repo.MaintainResource.RblIsConstrained.Click("9;11"); // Performing specific action(mouse click on second radio option)
}
return;
}
}
Please provide me with fix details for both errors and guidance from you. Let me know if any thing need to change in code or logic.
Thanks & Regards,
Varun.
Please review the following code snippet I am executing, as per your previous reply. Still RX not working for Radio options and throwing 2 errors as in attached snapshot.
public void Mouse_Click_RblIsConstrained()
{
if(VarIsConstrained.Length > 0) // Check to verify whether value of variable is available in data source
{
if(VarIsConstrained == "Primary") // Check to verify value of variable(which was set via the data connector) is set to a specific value
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'MaintainResource.Primary' at 22;6.", repo.MaintainResource.PrimaryInfo);
repo.MaintainResource.Primary.Click("22;6"); // Performing specific action(mouse click on first radio option)
}
else
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'MaintainResource.RblIsConstrained' at 9;11.", repo.MaintainResource.RblIsConstrainedInfo);
repo.MaintainResource.RblIsConstrained.Click("9;11"); // Performing specific action(mouse click on second radio option)
}
return;
}
}
Please provide me with fix details for both errors and guidance from you. Let me know if any thing need to change in code or logic.
Thanks & Regards,
Varun.
You do not have the required permissions to view the files attached to this post.
Re: Want to drive Radio and Checkbox options w.r.t data in Excel
Hi Support,
I am done with this Issue. Thanks for your kind support
Regards,
Varun.
I am done with this Issue. Thanks for your kind support
Regards,
Varun.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Want to drive Radio and Checkbox options w.r.t data in Excel
Hi,
I am glad you were able to solve the issue!
Regards,
Markus
Ranorex Support Team
I am glad you were able to solve the issue!
Regards,
Markus
Ranorex Support Team