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 name

Elements do not necessarily have ID attributes on all of them. Elements can have names that we can use to locate them. In the Target textbox this would look like name=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 and in the Target textbox of Selenium IDE, place the value of its name attribute. For example, use but2 as in the following screenshot against http://book.theautomatedtester.co.uk/chapter2.
    Time for action - finding elements by name
  4. Type the command click into the Command ...

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