1. Object of testing was Joomla component – web pages with custom validation functions (using Mootools 1.11)
2. Opera was not starting – necessary hack was to use on the beginning of test code command ‘selenium.open(url)’ twice as was written by amadouwade in http://code.google.com/p/selenium/issues/detail?id=411 (“You can use selenium.openWindow(url, windowdId) instead of selenium.open(url). Otherwise if you use selenium.open(url) twice the page will be loaded correctly.”).
3. Running the same test script with Internet Explorer 8 was most difficult story because of two major obstacles :
test run was very slow – four times slower as it was in the case using Firefox 3.6 (IE8 84s. / FF3 20s.)
test was alerting with non-existent error when after ‘selenium.type(..)’ command have to run page javascript on event ‘change’.
Slow testing progress of IE8 was caused by using default multiple Window browser arragement. Necessary correction can be solved by using -singleWindow Selenium RC start parameter, but Selenium server embedded in NB does not have possibility to set any startup parameters. Succesfull solution was to stop embedded Selenium server in NB and to start external Selenium server with following command :
call java -jar selenium-server.jar -singleWindow
In this environment test runs with IE8 speeded up to FF level reaching 27s. total time.
Second problem with IE8 not firing onchange event under Selenium RC control (manual testing was all OK) was finally solved with additional command (relating to Mootools 1.11 framework) located after ‘selenium.type’ command :
selenium.runScript(“element.fireEvent(‘change’,params)”);
in specific test context it was exactly written as selenium.runScript(“$$(‘input[name^=ex_com_content]‘).fireEvent(‘change’,’0′)”);
Solution was taken from http://cfc.kizzx2.com/index.php/tag/selenium-rc/ where are two possibilities shown :
jQuery selenium.runScript(“$(‘#MyInputElement’).trigger(‘change’)”);
JavaScript document.getElementById(‘MyInputElement’).onchange();