Testrunner Correct Paths & HTA Mode

0

I have written in a previous post about the Selenium Testrunner.  One of the main problems that I faced in dealing with the TestRunner mode was the limitation of the JavaScript. In the TestRunner mode of Selenium, you will only be able to test the functionality of your own Website; you will not be able to run tests against third party sites, such as Google or Amazon, due to the cross-scripting security limitation of JavaScript.

At the Selenium official site, they recommend the usage of "HTA mode" to solve this problem. This, however, is restricted to Windows and IE only; you can't use HTA mode to test any other browser. An HTA file is a special type of HTML file that is allowed to violate the same origin policy and to write files to disk.

I ran it but it didn't work for me. I reviewed all its commands to log in and it functioned well but it failed to store the session ID that I was in, hence it directed me to the website home page rather than my home page as a logged in user.

The only solution is you have to run it from inside the web application server; just place it in src/test/selenium/TestSuite.html.

If you add a new test, remember to add it in the same file inside the server so the TestRunner will find it, but remember that your changes will not be visible to the TestRunner in the deployed webapp unless you re-package and deploy it.

References - Quick
update on Selenium in TestRunner mode
- Why
do I have to install Selenium Core on the same web server?
- HTA
mode

 

Written By:

Heba Hosny

Post a Comment

eSpace podcast Prodcast

RSS iTunes