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

Need your help in coding

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manohara
Top achievements
Rank 1
Manohara asked on 09 Feb 2015, 04:33 PM
Hi Team,

I am new to Test Studio and wanted to test our Silverlight web application for POC. I have a dropdown list in a page, This list has around 40 items with a checkbox and name. I want to select a checkbox based on the name. Could you please help me in letting know how to code the same so that I search for the item in the list one by one and later select the required one.

If there is any video or steps, request you to kindly share the same.

Thanks,
Manohara.KS 

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 10 Feb 2015, 05:31 PM
Hello Manohara,

What you ask for is an extremely advanced automation sequence, especially in Silverlight. There are 2 things that make this difficult (but not impossible) to achieve:

1) The Silverlight run time engine has a bad habit of only putting in the Silverlight Visual Tree (which is what we use to discover what UI elements are present) what is needed to render the UI in the browsers window. If only 15 elements are visible in the list, then only about 17 out of the 40 items will be contained within the Visual Tree. You have to cause the list to scroll before you can iterate through all 40. Plus as you scroll the Silverlight run time engine will remove the ones no longer visible then add the ones you just scrolled into view.

2) Silverlight UI is based on XAML, which is extremely flexible and customizable. The checkbox can be placed before the text or after the text. The text can be split into multiple parts, and so on. Thus you have to discover what exactly is the structure of each element, where is the checkbox relative to the text before we can create custom code to match your text.

If you can share with me your Silverlight application so I can study the internal structure of its Visual Tree then I can assist creating code that will work with your custom Silverlight application. Another option is for you to export your Visual Tree. I can still create some code around that, but it will be untested.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Manohara
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or