Important points about relevant applications - Selenium

Before starting this chapter we should begin by making sure that we have all the relevant applications installed. While these are not foolproof, they will give us some clue how to construct the locator for our tests to use.

  • Firebug:
    Firebug has become the defacto tool for web developers as it allows developers to find elements on the page by using the find functionality.
    It has a JavaScript REPL. REPL stands for Read-Eval-Print-Loop or interactive shell that allows you to run JavaScript without having to create an entire page.

  • Firefinder: for-firebug
    A very good tool for testing out XPath and CSS on the page. It will highlight all elements on the page that match the selector to your element location.

  • IE Developer Tools:
    This is built into IE7, IE8 and IE9 that we can launch by pressing F12. It also has a number of features that Firebughas.

  • Google Chrome Developer Tools:
    This, like IE, is built into the browser and will also allow you to find the elements on the page and be able to work out its XPath.

Once you have worked out your locator, you will need to put it into Selenium IDE to test it.At the beginning of Chapter (Getting Started with Selenium IDE), Getting Started with Selenium IDE there was a section that explained the layout of Selenium IDE. One of the buttons on the page is named Find. Click on this button when you have something in the Value textbox; it will highlight the item in green as shown in the next screenshot. On Mac OS X, the background color will flash yellow.

Now that we have these tools and understand how to use them we can start adding decent locators to our test scripts.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Selenium Topics