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 – storing elements from the page

To see how this works lets work through the follow example:

  1. Open up Selenium IDE and switch off the Record button.
  2. Navigate to http://book.theautomatedtester.co.uk/chapter1.
  3. Right-click on the text Assert that this text is on the page and go to the storeText command in the context menu and click on it.
  4. A dialog will appear as shown in the following screenshot. Enter the name of a variable that you want to use. I have used textOnThePage as the name of my variable.
    Time for action – storing elements from the page
  5. Click on the row below the storeText command in Selenium IDE.
  6. Type type into the Command textbox.
  7. Type storeinput into the Target box.
  8. Type ${textOnThePage} ...

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