8 Answers, 1 is accepted
0
Hi Dimon,
Cody
the Telerik team
Our built-in data drive feature allows you to turn on/off a specific radio button according to the data contained in the data source. We don't support finding the right radio button to select via a data driven step.
This can be done is code however. If you need assistance with this let us know. We'll need to see the HTML behind your radio buttons, along with how you want the data to look in your data source before we can give you a complete working solution.
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Dimon
Top achievements
Rank 1
answered on 23 Jun 2012, 05:16 PM
Cody,
Thanks for your reply. Our example HTML looks as follows:
the Excel file example content:
category title
2 Second title
5 Fifth title
We want 2 iterations for this file, first must select category radio button with value=2 and title "Second title". And the same for all excel rows.
Thanks for your reply. Our example HTML looks as follows:
<
input
type
=
"radio"
value
=
"1"
name
=
"category"
/>
<
input
type
=
"radio"
value
=
"2"
name
=
"category"
/>
<
input
type
=
"radio"
value
=
"3"
name
=
"category"
/>
<
input
type
=
"radio"
value
=
"4"
name
=
"category"
/>
<
input
type
=
"radio"
value
=
"5"
name
=
"category"
/>
<
input
type
=
"text"
value
=
""
name
=
"title"
/>
the Excel file example content:
category title
2 Second title
5 Fifth title
We want 2 iterations for this file, first must select category radio button with value=2 and title "Second title". And the same for all excel rows.
0
Hello Dimon,
Thank you for providing the HTML. Your scenario can be accomplished by using a Data Driven Find Expression in coded step. Here's the code:
Please see this video for more information on how this works.
Kind regards,
Plamen
the Telerik team
Thank you for providing the HTML. Your scenario can be accomplished by using a Data Driven Find Expression in coded step. Here's the code:
HtmlInputRadioButton button = ActiveBrowser.Find.ByExpression<HtmlInputRadioButton>(
"type=radio"
,
"value="
+ Data[
"category"
].ToString());
button.Check(
true
,
true
);
Please see this video for more information on how this works.
Kind regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
AlphestDev
Top achievements
Rank 1
answered on 30 Jun 2012, 07:44 PM
Cody, Plamen,
Thanks, it is really helpful.
On-the-go video tutorials - good idea!
Kind regards,
Vyacheslav
Thanks, it is really helpful.
On-the-go video tutorials - good idea!
Kind regards,
Vyacheslav
0
Dimon
Top achievements
Rank 1
answered on 01 Jul 2012, 01:22 PM
Tx great it works
0
Hi Dimon,
Glad to hear it! Please contact us again if you have further questions.
Kind regards,
Plamen
the Telerik team
Glad to hear it! Please contact us again if you have further questions.
Kind regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Floyd
Top achievements
Rank 1
answered on 07 Mar 2013, 05:47 PM
Cody,
You say that the "build-in data drive feature allows you to turn on/off a specific radio button according to data contained in the "data driven" I have included an image of the data driven drop-down being open for a radio button I would like to click on. There are no options for me to choose. How do I click on a radio button used spreadsheet data when the data doesn't appear as a selection option in the "data driven" dropdown?
You say that the "build-in data drive feature allows you to turn on/off a specific radio button according to data contained in the "data driven" I have included an image of the data driven drop-down being open for a radio button I would like to click on. There are no options for me to choose. How do I click on a radio button used spreadsheet data when the data doesn't appear as a selection option in the "data driven" dropdown?
0
Hello Floyd,
We already have an existing feature request to expose binding properties for a RadButton. You can track its progress here: Public URL.
The workaround is to convert the "RadButton click" step into coded step using the "Customize Step in Code" feature from the Test Step Context Menu and edit the generated code like this:
Please see this video for more information.
All the best,
Plamen
the Telerik team
We already have an existing feature request to expose binding properties for a RadButton. You can track its progress here: Public URL.
The workaround is to convert the "RadButton click" step into coded step using the "Customize Step in Code" feature from the Test Step Context Menu and edit the generated code like this:
Pages.ASPNETButtonDemoRadios.ContentPlaceHolder1RadButton22Span.Checked = Convert.ToBoolean(Data[
"State"
]);
Please see this video for more information.
All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings