I am using Selenium RC to automate some browser operations but I want the browser to be invisible. Is it possible with Selenium RC. If yes, then how and if not then Is it possible through Selenium Grid.
Can I hide the Selenium RC window also?
I am using Selenium RC to automate some browser operations but I want the browser to be invisible. Is it possible with Selenium RC. If yes, then how and if not then Is it possible through Selenium Grid.
Can I hide the Selenium RC window also?
There are a few options:
You could use Selenium Grid so that the browser is opened on a completely different machine (or virtual machine) that you can then connect to via VNC or Remote Desktop Connection if you wanted to see the browser.
You can run Selenium 'headless' on Linux. I've never tried doing this and doubt it's really worth the effort. http://www.alittlemadness.com/2008/03/05/running-selenium-headless/
You can wrap Selenium RC in a Windows service. http://support.microsoft.com/kb/137890
Another option would be to use something like WebDriver and use the HTMLUnitDriver, which doesn't launch a 'real' browser. http://code.google.com/p/webdriver/
Of course there's also the option of using a service like SauceLabs, where you can get your tests to be run in the cloud. After your tests have completed you can watch a video of them running.
+1 for Selenium RC as a windows service.
For having the tests run completely hidden, I think you don't have much solutions if you're on windows.
What I'd do it to dedicate a computer in your LAN to be online all the time and have a selenium RC server running. So you use that computer's IP instead of localhost to run your tests. For example:
browser = selenium("10.15.12.34",4444,"*firefox","http://saucelabs.com")
(considering that that's the ip of the computer running the server).
Having that setup, you run your tests in you computer, the browsers and the RC server window are in another computer and the go back to yours once done.
If you're on Windows, one option is to run the tests under a different user account. This means the browser and java server will not be visible to your own account.