HTTP Auth and Selenium
I ran into a major problem straight away. Our web interface uses Basic HTTP Auth and Firefox insists on presenting a dialog to the (non-existent) user when you open a http://user:firstname.lastname@example.org/ style URL. The tests would hang waiting for the Ok button click.
After a lot of searching I finally found the network.http.phishy-userpass-length. option. When set to 255 the authentication warning dialog box isn't shown.
Selenium creates a fresh Firefox profile every time it starts Firefox so modifying the option in
about:config doesn't help. You need to edit firefox.js and add a line like
pref("network.http.phishy-userpass-length", 255);. This ensures that the option is set in any new profile. On Windows firefox.js can probably be found at
Program Files\Mozilla Firefox\defaults\prefs\firefox.js. It'll probably be at
/usr/lib/firefox-*/defaults/pref/firefox.js on a Linux machine.
I wonder if Selenium-RC could set this option in profiles it creates itself? It already seems to set a bunch of other options.
posted: Tue, 07 Nov 2006 01:58 | permalink | comments
Selenium at London 2.0
I went to the regular London 2.0 meetup last night. Great people, interesting conversations and a little too much beer.
One of the Selenium developers, Jason Huggins demoed Selenium and Selenium-IDE on a Macbook notebook running the Parallels virtual machine software. He had several virtual machines running different platforms including Ubuntu Linux, Windows XP and Mac OS X with different browsers on each. Testing was triggered by checking in code to the SVN repository of Buildix virtual machine also running on the laptop.
The crux Jason's demo was that you could have a complete multiplatform web application test system running on a bottom level Macbook laptop (with extra RAM). The machine appeared to run very quickly despite the 5 or 6 VMs that were running. Jason mentioned that if you don't care about Mac browser testing (Safari) then you could set up a similar system using VMWare or Xen on Linux or Windows.
Selenium-IDE also looks seriously cool. It's a Firefox plugin that provides a complete environment for developing test cases. It can record your steps as you use a web interface and output to a variety of test script formats including a HTML stype sequential output, Python and Ruby. If using Python or Ruby scripts you can use all the features of the language such as conditions and loops. Selenium-IDE is going to make developing effective complete web tests so much easier (and fun!).
posted: Wed, 06 Sep 2006 09:47 | permalink | comments