Telerik blogs

Visual Event is a little tool I found. When I say that I "found" it - I literal discovered it after Google-ing "detect javascript events" or something to that effect. Neither Telerik nor I personally have any affiliation with the Visual Event product or its makers. Anyway the tool will help you determine what javascript events are associated with a particular control. Javascript events are a crucial part of UI automation. Good understanding of how and when they are employed in your app can save you a lot of trouble.

90% of the time switching your step to SimulateRealClick/Typing=true will help if a given JavaScript event doesn't fire as intended. I've already talked about this in a previous blog post.

Other times you may want to manually fire a JavaScript event through code as seen here. In the sample we use code to fire off the change event. However, any control can have a variety of events attached to it and you need to determine what those are if you want to fire them manually from code. Visual Event will help. It’s a “bookmarklet” so you just drag it in your bookmark bar. From there you’re ready to start using it as a browser add-on. Here’s a video demonstrating how to do that.

This is a good time to mention that the above article will soon become obsolete.  We will be introducing some enhancements to Test Studio's jQuery-handling abilities. This will include a brand new jQuery API. And we will also automatically detect and fire the change event without you having to write any code at all.

About the author

Stoil Stoichev

Stoil Stoychev

has been helping customers solve their complex testing challenges leveraging his in-depth knowledge of Telerik Test Studio. He has traveled the globe fine-tuning his technical expertise and helping our valued clients succeed. In his spare time he enjoys motorcycles, live music and various sports.


Comments are disabled in preview mode.