Thursday, August 30, 2012

XPATH identification using XPATHER in latest versions of Mozilla Firefox


XPATH identification using XPATHER in latest versions of Mozilla Firefox- 14

1)      XPATHER:-



Right Click on the xpather-1.4.5-fx.xpi file.


Extract with 7zip File Manager:-


Click on “Select the file” > Right click > Press Edit





The file would contain.
<em:maxVersion>3.6.0.*</em:maxVersion>





Change the <em:maxVersion>14.*</em:maxVersion>  
Or whichever Mozilla Firefox version you are using.


Save the file> Close the edited file > A pop-up message will be displayed:
File “install.rdf” was modified.
Do you want to update it in the archive?
Press OK.



 
 Start Mozilla Firefox
Click File > Open File > Navigate to the folder where you have updated xpather-1.4.5-fx.xpi file.





Open the xpather-1.4.5-fx.xpi file and follow the instruction to install.

  In Mozilla Firefox Browser-

Click on Tools > Click on Add-ons >Add-ons Manager is displayed.
Navigate to XPATHER 1.4.5 > Click on Enable button > Restart the browser.


Restart the browser > search for any keyword > Right click on the element > Click “Show in Xpather”.

XPATH captured is displayed





For example the captured XPATH is:-
/html/body[@id='gsr']/div[@id='main']/div[2]/div[@id='cnt']/div[4]/div[@id='rcnt']/div[@id='center_col']/span[@id='taw']/div[@id='tads']/ol/li[1]/div/h3/a[@id='pa1']
Use it to generate your absolute xpath-
id('gsr')/div/div[2]/div/div[4]/div/div/span/div/ol/li[1]/div/h3/a


To overcome the problem of entering the xpath in XPATHER pop-up, I suggest you to install XPATH CHECKER.
You can use the Edited XPATH and check for its validation immediately using XPATH CHECK.










No comments:

Post a Comment