vote up 2 vote down
star

This question is for people who have experience in using Selenium.

What lessons learned can you share? What mistakes have you made (or seen made)? What would you have done differently if you could do things again? What kinds of bugs, if it is possible to generalize from your experiences, have Selenium-driven tests been effective at identifying? Not as effective at identifying? What blogs, articles, or instructional videos have you found to be most helpful to get people on your team up to speed quickly?

Thanks in advance for any suggestions - on any of the questions above.

I will be testing a web application that has been designed to work on all major browsers with the Exception of IE6. The underlying app was written in Ruby on Rails. The GUI has a lot of JavaScript. Most of the early bugs have been inconsistencies in the way web pages are rendered in different browsers.

flag

5 Answers

vote up 1 vote down

I have a little experience with Selenium. We chose it because it was the tool that was used by a framework we use called Liferay. Unfortunately, the code for the tests they have developed is not very sophisticated.

Liferay does one thing interesting with Selenium: they develop their tests in the "Selenese" HTML table format. They then pass the HTML though a process that converts it into Java version of the same test. However, they have enabled the ability to have keyword replacement, dynamically created values, etc.

We took this approach and extended it. Now, we have a library of commands that we can reference in an HTML table. These single line commands represent much longer and more robust java routines. This is especially useful since we are dealing with an AJAX application and need to develop logic around updates that do not involve full page loads.

All of this is a long way of saying that I suggest you look at the various programming languages supported by Selenium.

link|flag
vote up 0 vote down

I have used Selenium driven by python scripts and have found it most useful. We had various Virtual images in our labs with different OSs, Browsers etc and used Selenium to power the web application under test. We then reported back using Mercury Quality Centre API calls so that the script results could be analysized etc.

There is some news coming out from Selenium that they have a sponsor now and developing a commercial service which uses Selenium IDE. (http://saucelabs.com/)

The good part of this is that they offer in the cloud testing service in which yu can run your web app on all known browsers.

Hope this helps.

link|flag
vote up 0 vote down

Some quick lessons I learned using Selenium is 1)Need to use Selenium RC to write effective tests 2)Organizing the locators and test code abstraction is important,otherwise maintenance is nightmare 3)A well-known fact that XPath is slow on IE (atleast 20x slow) if you plan to run on multiple browsers(Workaround to use CSS selectors,but not pretty) 4)Doesn't work well with custom javascript dialog boxes

link|flag
vote up 0 vote down

Started using it in Java-Junit combination. Found Se-IDE sometimes not showing the correct XPath or recorded in FF not working IE.

link|flag
vote up 0 vote down

Here are the steps I use with writing Se tests:
1. Map out exactly what you want to do. (This article may help)
2. Use Selenium IDE to click through the path of your test (this is very helpful for pulling the locators your need)
3. Convert, using Se IDE, your script to the language of your choice (I use C#) and run the test using Selenium RC.
4. Refactor

In addition to the saucelabs link above, some great resources for Selenium are Adam Goucher, Chris McMahon, and Marissa Seal.

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.