Next week’s San José Selenium Meetup–Selenium @ Adobe–features a couple “short talks,” one of which is by yours truly! Starting from Scratch with RC, Python, and Pysaunter will cover my experience starting up a Selenium automation effort literally “from scratch.” I’m sure you’ve all heard of RC and Python, but perhaps not Pysaunter. Pysaunter–developed by Selenium developer and consultant Adam Goucher–is an open-source framework that supports Selenium/Python test development with either the RC or WebDriver APIs.
Part of my goal in giving a talk about my experience with Pysaunter at next Tuesday’s Meetup is to increase the size of the Pysaunter community so that I’ll have more people with whom to discuss automation issues! To help achieve that goal, I want it to be as painless as possible for people to get started developing with Pysaunter. So here forthwith are installation instructions which I created for my co-workers’ use. (I could cover these in my talk next Tuesday, but that would make for a seriously boring couple of slides!) Obviously, you may not need to do every step, depending on what software is already installed on your system.
- Install Java (at least 1.6).
- Ensure that your path environment variable includes the directory where the java executable is located.
- Download the latest selenium-server-standalone-2.x.jar file from SeleniumHQ.
- Enter java -jar selenium-server-standalone-2.x.jar at the cmdline of either a Mac OS terminal window or a Windows cmd window. This starts up the Selenium server. Minimize the window and use a separate one for the remaining commands below.
- Download/install Python 2.7.2. (Python 3 will not work.)
- Ensure that your path environment variable includes the directory where the python executable (python.exe on Windows, python on Mac) is located.
- Download/install setuptools from PYPI.
- Ensure that your path environment variable includes the directory where the easy_install executable has been installed.
- Enter easy_install -U py.saunter at the cmdline. This installs the pysaunter software. Note, that you can also use this same command to update to the latest version of py.saunter in the future.
- Download py.saunter (in order to get the examples) from GitHub. (Ignore the Sorry, there aren’t any downloads for this repository message!)
- From the download location you’ve chosen, enter cd examples/saucelabs (RC example).
- Open conf/saunter.ini in an editor and go to the [Selenium] heading.
- Modify the server_path line to point to the Selenium server .jar file you just installed.
- Modify the browser line to add the appropriate path for Firefox (chrome) on Mac OS. On Windows, be sure to not surround the pathname with double quotes, even if it contains embedded spaces.
- Run the examples via: pysaunter.py -m deep -v
I hope you can make it to next Tuesday’s San José Selenium Meetup, either in person (please RSVP in that case!) or via our Adobe Connect session. If you’re interested in attending but can’t make the live timeslot, I’ll be posting the URL to the recording afterward, so watch for a new post that evening.
Finally, as I said at the beginning of this post, the Meetup will feature a couple of short talks. My colleague from NOIDA–Ashish Gupta–will present Test Data Extraction & Generation and Performance Analysis Using Selenium. Part of Ashish’s presentation deals with his use of Selenium for a purpose other than automated test cases, which I’ve done in the past and have always found intriguing. So, I’m particularly looking forward to hearing his talk!