How to use FireBug and Firepath ?
Lets inspect "Google Search" button on google page.
1.Open FireBug and click on the inspector(rectangle with cursor) and click on the "Google Search" button on Google.com
2.When you click on that button you will be able to see source code and also firebug highlight the source code for that particular element
3.Now Goto firepath option
4.Firepath will highlight both source code and the respective element on the webpage
5.Firepath will shows you the Xpath value by default and here the xpath values is :".//*[@id='tsf']/div/div/center/input"
6.If we want to see css value, we should change the option to css.
7.Sizzle is something like css only, no need to worry about it
Verify the Xpath and Css values
Firepath not only helps us to find the xpath value but also verify it.
In some cases fire path might not give you a unique element at that times we need to write our own xpath and css(we have seperately)
For example purpose let me write the a xpath and verify it.
To verify we need to write the xpath and place same xpath on the xpath edit bar on firepath and press "Enter Key"
Xpath Given by firepath: .//*[@id='tsf']/div/div/center/input
My own Xpath: //input[@name='btnK']
Article is written by Pavan (a) KarthiQ. Well, I am serving notice period in an MNC, Bangalore. I thought to enrich every person knowledge a little, I always have a feeling, when we teach something, we will learn more than what you know.
Knowledge is the only thing that doubles when you spend it.
I have also created the reporter for Protractor Jasmine. Use for your projects without any hesitation