Time for action - finding IDs of elements on the page with Firebug - Selenium

In this section we are going to find a number of elements that are on the page. You will need to have Firebug installed for this. We are going to look at how to find the ID of an element using Firefox.

  1. Navigate to http://www.wisdomjobs.com/chapter(Locators) and click on the Firebug icon.

  2. Click on the Select Element icon in Firebug - -.

  3. Move your mouse over the element that you wish to have a look at.

  4. Move your mouse over different elements. As you can see in the following screenshot, firebug will highlight each of the items that you want to see:

What just happened?

Once one has been selected, you can see that the element and all of the different attributes are now visible. We saw that the item became highlighted, or a single color box surrounded it, so that we can see which item is selected. We see this in the previous screenshot.

Now that we are confident on how to find elements and their attributes, let's start using them in Selenium.

Pop quiz - using the Find button

  1. What color is an element bordered with when the Find button is clicked in Selenium IDE?

    1. Red

    2. Green

    3. Amber

    4. Yellow


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

Selenium Topics