Hi SmartClient Team (and anyone else who can provide any input),
I have been experimenting with testing SmartClient components (such as expandable ListGrids) using HtmlUnit. I understand all the reasons for using Selenium RC rather than using a headless browser testing framework. However my boss wanted me to see if we could first leverage HtmlUnit at all for testing pages loaded with SmartClient since we use JWebUnit+HtmlUnit for other tests and also since they can test things like response headers. Otherwise, we will go with your suggested recommendation to use Selenium RC.
I am basically having issues with testing event handling such as clicking a ListGrid cell. I have read the Automated Testing documentation and am using AutoTest and scLocators (using user-extensions.js under smartclientSDK/tools/selenium/ as a guidance) to get a reference to the respective DOM element. I then execute click events on the list grid cell in Java using HtmlUnit (I tried the sequence mouseOver, mouseDown, mouseUp and click too) but HtmlUnit unfortunately doesn't seem to tie well with SmartClient and doesn't work.
After debugging into the modules-debug ISC_Core and ISC_Grid JS files, it looks like the event handlers calculate the ListGrid rowNum and colNum using the event X and Y coordinates. When I perform a click through HtmlUnit, it doesn't seem to provide reasonable event coordinates (I am assuming because HtmlUnit doesn't render the page) causing the SmartClient calculated row and column numbers to be invalid and event handling to not work.
Is my understanding correct that SmartClient handles ListGrid events using event mouse coordinates under the hood? Is there another way you suggest I can test click events through htmlunit before I move to Selenium RC?
I am using v8.3p_2013-02-14.
Thanks
I have been experimenting with testing SmartClient components (such as expandable ListGrids) using HtmlUnit. I understand all the reasons for using Selenium RC rather than using a headless browser testing framework. However my boss wanted me to see if we could first leverage HtmlUnit at all for testing pages loaded with SmartClient since we use JWebUnit+HtmlUnit for other tests and also since they can test things like response headers. Otherwise, we will go with your suggested recommendation to use Selenium RC.
I am basically having issues with testing event handling such as clicking a ListGrid cell. I have read the Automated Testing documentation and am using AutoTest and scLocators (using user-extensions.js under smartclientSDK/tools/selenium/ as a guidance) to get a reference to the respective DOM element. I then execute click events on the list grid cell in Java using HtmlUnit (I tried the sequence mouseOver, mouseDown, mouseUp and click too) but HtmlUnit unfortunately doesn't seem to tie well with SmartClient and doesn't work.
After debugging into the modules-debug ISC_Core and ISC_Grid JS files, it looks like the event handlers calculate the ListGrid rowNum and colNum using the event X and Y coordinates. When I perform a click through HtmlUnit, it doesn't seem to provide reasonable event coordinates (I am assuming because HtmlUnit doesn't render the page) causing the SmartClient calculated row and column numbers to be invalid and event handling to not work.
Is my understanding correct that SmartClient handles ListGrid events using event mouse coordinates under the hood? Is there another way you suggest I can test click events through htmlunit before I move to Selenium RC?
I am using v8.3p_2013-02-14.
Thanks
Comment