Posted by: sourceoffailure | July 8, 2008

Transforming Selenium into Bromine


By transforming Selenium scripts into Python, and running the Selenium Server on localhost,  I am able to automate and modify tests as one monster test suite as grouped in a folder. A future objective of mine is to unify unit tests and browser-end unit tests into one command.

The title for this week’s blog was inspired by a little bit of alchemy; Selenium is a JavaScript testing tool that is used on the browser level to check that all the Javascript is working properly. When you add a proton, in this metaphor representative of an idea, you get Bromine (Br). But watch out, it’s unstable.

In this case, that proton is Python. This isn’t to say that throwing Python will make Selenium unstable, or better. I’m more or less trying to say that it’s an interesting, potent mix of poison and radioactivity.

Metaphors aside, I’ve been able to get the Selenium server up and running, which acts as a proxy server so Selenium can preform JavaScript testing. To my surprise, and my delight, the Selenium Server is written in Java, which I daresay is the closest thing that CS has to a lingua franca.

Getting Selenium to cooperate with Firefox shouldn’t be that hard with some help, and then I will be able to write some tests, using the Selenium IDE, that is then exported into Python and run as a batch.

This may involve writing a Python script that edits a Python script so that it can be run by anyone, because currently Selenium would enter my login information as a string, so other people would not be able to run my test successfully unless they were impersonating me. A little bit of basic metaprogramming didn’t hurt anyone, did it?


Apologies to Qi and Liz, whose comments were dumped by spam filters into the spambox. I’ll be sure that doesn’t happen again. Your comments were greatly appreciated.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: