Skip to main content

Posts

Showing posts with the label selenium

Selenium RC headless on linux

My laptop is slow enough with only 1.2G RAM and I don't want to make it even slower by running the Selenium server and an instance of Firefox (I used Chrome all the time). Better make use of the idle dev server at the office. So I'm thinking of running the Selenium server at the remote machine and use ssh tunnel to proxy port 4444 on my laptop to port 4444 on remote server. When running the test, the server gave an error message "Failed to start new browser session ...". Already expecting this since X is not running on the remote server. Googling around, the solution is simple. Our old friend X frame buffer to the rescue. So just apt-get install xvfb and use the following command:- $ Xvfb :1& $ export DISPLAY=:1 and then restart the Selenium server. You can see the test running now through the console (of course you can't see the real browser opening up). For some reason, Xvfb doesn't return my prompt so I have to explicitly put it to the background with ...

Selenium is usable and I'm very happy

I always thought Selenium is hard to use and doesn't worth my time. So in the past, I used twill to create a script (python) that would go the site, filling in any forms and did all tests that I would normally do by hand. It's a life saver. You don't want to fill in the large HTML form by hand every time you need to test your app. Using twill, I can just press the Enter key and it will run all tests I want. I can even go take some drink and snacks while the tests is running and get back to see whether it success or not. But there's one downside with twill, you need to crafts all the test script by hand, looking at each form field you need to fill in. So this time I think it's time to start looking back at Selenium. All cool guys out there are using it to test their applications, it shouldn't be that hard. There's 2 parts of Selenium (actually it's more than that but for now I'd only interested in that 2 parts):- Selenium IDE - Firefox addons that all...