Ask the Expert

Advice on implementing Selenium IDE

Could you offer some tips on using Selenium IDE effectively and when to use it?

Requires Free Membership to View

The biggest tip I can give you is to be sure you install FireBug and/or Web Developer. These two tools are full of features that can help you better understand the website you're testing by allowing you to inspect various elements, building out XPath, and leveraging various tools to better understand the site. Not using tools like these can be like creating tests in the dark.

After that, the next best tip would be to make sure you understand various commands you have available in Selenium. Not unlike other test tools, there might be five ways to do something, and each of them can have subtle implications to your tests. For a classic example, you can look at Selenium's Assert and Verify commands. When you use Assert, your test script will end as soon as the Assert fails. When you use Verify, your test will continue and simply log the fail at the end of the test. There are many differences like this in commands, and the only way to know which one to use is to know what they are and what they do. If you're new, start with the overview. Once you've logged some time creating tests, take some time to learn Selenese.

General advice for when to automate a test will really depend on the team you're working with. Some teams create large regression test beds, others only use automation for smoke tests. I don't want to steer you in the wrong direction. However, I will say that I'll commonly record a test in the following scenarios:

  • If the developers know how to run a Selenium test, I'll record the steps to create a defect and attach it to my defect report. That shows the exact steps to reproduce an issue and it provides the developer with a test for when they think they have a possible fix. •
  • If I'm doing exploratory testing and I encounter what I believe might be a critical piece of functionality, I'll record my tests for a short period of time while I test. Later, I'll come back and clean those tests up so I have a small regression test bed for that functionality. •
  • If I'm doing testing that involves a large number of scenarios that require data entry via a GUI, I'll record a test and then augment it to allow me to have that script populate the data and do any required verification.
  • Your team might have other methods of determining when to automate a test. I suggest talking it over with them. I suspect that together you'll quickly come up with some common scenarios for when to create a script.

    This was first published in September 2009

    There are Comments. Add yours.

     
    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to: