I received an interesting e-mail from a person who is currently trying to test a SproutCore app he built using the Selenium framework. For those not familiar with Selenium, it is an open source test automation framework for web-based applications. Selenium has tools that allow you to record or program a set of actions that can be replayed in most of the popular browsers either through a Mozilla IDE plug-in or using a remote control framework. In any case, Selenium is great for automated feature and integration testing and can be extended for your own needs.
DIV element, then that element’s click method will be invoked.
So why does the standard clicking not work in a SproutCore application? Because clicking is actually two actions: mouse down and then mouse up. Why? It’s because of the way SproutCore likes to handle events, and in order to do things like double clicking and dragging, SproutCore has to be aware of when the user first moused down and then moused up. That is why when you create a new view (custom or extended) and you want to handle events on that view, there is no
click method that you can override, but you can override
Currently I’m starting to use the Selenium framework to do a lot of automated testing on a large, complex application. Because there are things that SproutCore likes to do that don’t follow the normal course of action in a typical web-based app, I’ll be capturing those hurdles and write posts about it as I go along.
In the mean time, have fun programming in SproutCore!