Shyam kumar wrote:Ok Guys, thanks for taking interest in this. Let me explain why I need the javascript to be disabled.
We have a web app which is functionally tested by ruby scripts. These ruby script test functionality of the site only when javascript is enabled. Now we need to write ruby scripts which test the functionality of the site when javascript is disabled. Our tested did some initial research and did not find any way to disable the javascript through ruby.
I'm thinking of writing a simple standalone java program which disables and enable the javascript dynamically. This java program can then be executed by ruby script before performing the funtional test.
I just hope I have made myself clear here.
Thanks,
SK
Hi Bibeault,
We are working in XP agile methodology in which continuous integration and testing is an integral part of development process. You may know this but let me explain in a little detail.
Our business analyst gather business requirements and break them into small stories.
Those stories comes in the form of a story card to us for development.
When me and my pair completes the stories, we hand over the story card to the Tester.
The role of our tester is a little different here. The tester do not perform the unit test because we test drive our code so unit test are a part of Junit test suit.
In our team the tester writes ruby scripts that emulate the end user behaviour and test the business functionality. These new scripts are added to the existing ruby test suite and then after each successful build, the entire suite of ruby scripts run which ensures that the new functionality has not broken any existing functionality. These ruby scripts run unattended and performs tasks such as opening the IE browser, passing the site url and then performing operations such as registration or login; adding some user-credentials and checking if successful login is done or not.
Now wherever these scripts run, they run unattended; we cannot manually disable or enable javascript and then let the ruby scripts run.
By default javascript of our browser remains enabled so these scripts test functionality in which javascript is enabled.
But now we need to test our site's functionality when javascript is disabled. In such a scenario we need a way to disable javascript dynamically so that the new variations to our ruby scripts can be added. If we have a java code that disables this javascript of browser dynamically then we will be able to run our ruby scripts for testing our site's functionality when javascript is disabled.
Does that give you a better idea of the overall discussion?
Thanks,
SK