O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - finding elements by ID

Elements often have IDs that are used to locate them. In the Target textbox this would look like id=Element. Follow the given example to see how it would work:

  1. Open Selenium IDE.
  2. Navigate to http://book.theautomatedtester.co.uk/chapter2 and click on the Firebug icon.
  3. Find any element that you want to interact with on the page and in the Target textbox of Selenium IDE, place its ID attribute value. Make sure that it has an ID attribute. For example, use but1 as in the previous screenshot against http://book.theautomatedtester.co.uk/chapter2.
  4. Type the command click into the Command selectbox.
  5. Play your script.
    Time for action - finding elements by ID

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required