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

Register for Events o

3 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shashank
Top achievements
Rank 1
Shashank asked on 17 May 2013, 05:35 PM
Hello,

I would like to capture events through the Teleric testing framework. I want my application to be notified whenever a user clicks on a button, changes text in a control, etc on a webpage with a Silverlight control.  When the framework notifies my application, I want my application to capture the control properties. Can you help me with some sample code which does that ? 

Thanks

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 18 May 2013, 08:21 AM
Hi Shashank,

In order to perform real mouse and keyboard actions against your Silverlight application, you can use the User property of the FrameworkElement class. It gets the UI interaction object(UserInteraction Members) that allows you to interact with your Silverlight elements directly as a real user would, triggering any events associated with these elements. However the implementation of the event handlers in your Silverlight application is beyond the scope of Test Studio support. That's really a question for the Microsoft Silverlight team since you're dealing with a Silverlight app and thus unrelated to Telerik Testing Framework.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Shashank
Top achievements
Rank 1
answered on 18 May 2013, 01:19 PM
Thanks Plamen. The User Interaction object exposes the methods to interact with the Silverlight control so I can "execute" a click  but how can my application be notified if a user "clicks" on a button? What I meant about event handlers was in the context of the Teleric testing framework : When the user clicks on a button on the Silverlight control, it is obvious that the Teleric testing framework gets notified. How can my application be notified about the event? I noticed some events in the Window class. Can they be used for this? Or may be the WindowEventArgs class?

Thanks for your help
0
Plamen
Telerik team
answered on 20 May 2013, 03:15 PM
Hi Shashank,

I am sorry, but it is not possible to create events in the context of the Telerik Testing Framework. Using our Framework you can only perform actions and verifications against your Silverlight elements. These actions will automatically trigger the corresponding events implemented in your Silverlight application. Please refer to this article for more information on how the event concept works in Silverlight.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Shashank
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Shashank
Top achievements
Rank 1
Share this question
or