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

How to identify custom controls and add coded step

3 Answers 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lim
Top achievements
Rank 1
Lim asked on 13 Sep 2010, 10:23 AM
Hi.  My team is currently evaluating WebUI and have hit a couple of roadblocks.  

1/ How can I find/identify custom controls?
2/ How do I find controls in a coded step?  I tried using code that I had built up using WebAii but it didn't work and didn't provide a particularly useful error message.  

Help on these questions would be greatly appreciated.  Thanks.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 14 Sep 2010, 07:12 PM
Hi Lim,

Thank you for taking the time to evaluate WebUI Test Studio.

  1. I'm afraid the tool can only see the base elements that are used to compose any custom control your developers create. For example, a calendar control usual consists of a test of buttons and text blocks (and sometimes a dropdown). We'll see and interact with each component that makes up this calendar control, but we won't be able to recognize and interact with such a custom calendar control as a "MyCustomCalender" type of object. Usually this is sufficient for most test automation scenarios.
  2. You have two options for interacting with elements in a coded step. a) During recording, you can highlight an element and add it as a Project Element. This will allow you to quickly and easily refer to that element with code like "Pages.USWorldPopulationClock.UsclocknumSpan". Or b) you can create your own FindExpression to find and interact with the element desired. How to use FindExpressions is documented here.

if there's anything else I can assist you with don't hesitate to ask.

Sincerely yours,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lim
Top achievements
Rank 1
answered on 16 Sep 2010, 11:38 AM
If I understand correctly this way I can only find a particular control and not all control of a particular type?  So can I search for all TextBlock in my SL app?  So far I haven't been able to do this using the WebUI QA or Dev.  Doing this with WebAii is quite straightforward.  
0
Cody
Telerik team
answered on 17 Sep 2010, 07:25 PM
Hi Lim,

WebUI uses the WebAii framework at it's core. Using a coded step you may code up anything you like just like when you were using only the WebAii framework. Thus yes you can find all controls in exactly the same manner.

Regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Lim
Top achievements
Rank 1
Answers by
Cody
Telerik team
Lim
Top achievements
Rank 1
Share this question
or