Question

I like using Selenium RC for automating interaction with webpages that require JavaScript, except for the fact that it goes through launching an full instance of Firefox to run a script. Questions:

Is there a way to run Selenium RC so that it launches a headless version of Firefox that doesn't create a window? I'm using OS X. I know there is a way to do this using Xvfb on a Linux server, but I'm wondering how this would be done on OS X.

Is there any lighter weight alternative to Selenium RC? The tool would have to execute any JavaScript on a webpage and alter the DOM accordingly. I'm not too familiar with Spidermonkey; but can it be used for this purpose? Thanks.

Was it helpful?

Solution

There's a well supported Java one called HtmlUnit, which is completely headless - there is no GUI. It runs Javascript.

If you don't want to directly call Java, you can in theory run Selenium with HtmlUnit as its backend headlessly - I haven't got it to work yet though.

Also, you might find Selenium 2 better than Selenium RC. It has the WebDriver built in, and looks like it is going to be better and more complete.

Finally, you could run Selenium remotely on your own separate Linux server, and call it from the Mac remotely. Or you can use a service like Sauce Labs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top