Locator identification

So now we have learnt how to automate the UI and services together, but before we end this chapter let's take a look at a tool which helps us find locators easily:

  • Fire Bug: An add-on for Firefox which helps create a locator
  • Fire Path: An add-on for Firefox which helps create a locator

The preceding two add-ons can easily be installed in Firefox.

Once the add-on is installed you will see a bug picture on the right-hand side of the browser.

Locator identification

Click on the bug on the browser and you will be able to see Firebug at the bottom of the screen.

Now when you need to find an element click on the arrow highlighted in the following screenshot and place it on the element you need to identify. In this example its the Google search field:

Locator identification

Once you do that, you can see the XPath visible as shown in the following figure:

Locator identification

This technique doesn't work for complex applications where you need to identify your locators by yourself but can be useful most of the time.

And finally to conclude this chapter we come to the summary.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.12.156