This is a migrated thread and some comments may be shown as answers.

Dynamically selecting a 'radtreeviewitem: item 'item1' select action

3 Answers 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 08 Sep 2011, 04:07 PM
OK, first off I am new to this tool so bear with me if this seems newbish.

How do I set a 'radtreeviewitem: item 'item1' select action to accept a different param for the piece labeled 'item1'?

1.  So I create the script, (recorded), and I selected <item1>
2.  Now I want to pass a different item, (item2 for example). 

How can I do this?  I just want to execute the script 99 times with each iteration containing a new item?  I am hoping I don't have to record every item initially for them to be included in the project elements.

Again I am new to this tool.  My background is in QTP which happens to suck with the silverlight tools here so we are trying to get this tool working as the recognition has been the best by far. 

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 08 Sep 2011, 05:21 PM
Hi Ken,

It sounds like you are after our Data Driven Testing feature. Your local or external data will contain 99 rows and your test will iterate 99 times, once for each value in the data table. The step that selects "item1" will be attached to a column in the data table to feed each value.

Please contact us again if you have further questions.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Ken
Top achievements
Rank 1
answered on 08 Sep 2011, 06:06 PM
Yes,I have the data driven working.  The problem with thsi control or object recognized, it seems it is hard-coded and I am not able to assign a variable to it.

So looking at the vb file:

This is the recorded and working piece

'radtreeviewitem: item 'Stater Bros.' select action.

Pages.TheWell2.SilverlightApp.StaterBrosRadtreeviewitem.Select

 

 

 

I want to change it to BijansBistro as shown below but that does not work.  Is there a way to assign a data variable to this line of code?  I am not using Visual Studio, I am using the Test Studio ide. 
'Pages.TheWell2.SilverlightApp.BijansBistroRadtreeviewitem.Select

 

 

0
Anthony
Telerik team
answered on 08 Sep 2011, 11:15 PM
Hi Ken,

It looks like you want to data drive the actual Find Expression. Please see this KB article. The code at the bottom is written for an HTML element, but you can easily follow its example to customize code for your Silverlight application.

Kind regards,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
Ken
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Ken
Top achievements
Rank 1
Share this question
or