Register for Events o

4 posts, 0 answers
  1. Shashank
    Shashank avatar
    3 posts
    Member since:
    May 2013

    Posted 17 May 2013 Link to this post

    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
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 18 May 2013 Link to this post

    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
  3. Shashank
    Shashank avatar
    3 posts
    Member since:
    May 2013

    Posted 18 May 2013 Link to this post

    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
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 20 May 2013 Link to this post

    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
Back to Top