Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
grab_xpaths_with_firebug [2007/10/17 17:48] – created kdimentdev:grab_xpaths_with_firebug [2017/11/12 19:53] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Quick guide to grabbing xpath expressions with Firebug ====== +<html><p id="zotero-5-update-warning" style="color: red; font-weight: bold">We’re 
- +in the process of updating the documentation for 
-You can get Firebug, Firefox web developer extension from [[http://www.getfirebug.com/|here]].  It's a useful tool for web developers, but it's main use for Zotero is for grabbing xpath expressions If you don't do much web developement you might want to look at [[http://simile.mit.edu/wiki/Solvent|Solvent]] different tool for doing the same+<href="https://www.zotero.org/blog/zotero-5-0">Zotero 5.0</a>Some documentation 
- +may be outdated in the meantimeThanks for your understanding.</p></html>
-First install Firebug and restart Firefox.  Once this is done you'll see a little tick or cross at the bottom right hand side of your browser window: +
- +
-{{firebug2.png|}} +
- +
-{{firebug1.png|}} +
- +
-Firebug displays a tick if there are no javascript errors and a cross if there are one or more errors.   +
- +
- +
-Click on the tick or cross and you get to see a lot of details about the current document which you are viewing: +
- +
-{{firebug3.png}} +
- +
-Next up, click on the "Inspect" button next to the cockroach at the top right hand side of the firebug window, and mouse over the bit of the page you're interested in (the view PDF link in this case): +
- +
-{{firebug4.png}} +
- +
-The next step is a little tricky.  In order to copy the xpath expression, alt-tab (or whatever the equivalent is for your operating system) to a different application, move the mouse over to the bit that has been highlighted blue in the firebug window, alt-tab back to Firefox and right click and select the "Copy XPath" option. +
- +
-Then we paste the xpath expression into our editor: +
- +
-<code> +
-/html/body/table/tbody/tr[5]/td[3]/div/table/tbody/tr/td/div/table[3]/tbody/tr[4]/td/a[2] +
-</code> +
- +
-We can edit this xpath down to something with a relative path: +
- +
-<code> +
-//div/table/tbody/tr/td/div/table[3]/tbody/tr[4]/td/a[2] +
-</code>+
  
  
 +See [[dev:technologies#using_firebug_to_design_xpath_expressions|Using Firebug to design XPath expressions]]
dev/grab_xpaths_with_firebug.txt · Last modified: 2017/11/12 19:53 by 127.0.0.1