XPath lets me searth the DOM (the web page in the browser memory) XPath always starts with the root element and work down the tree XPath has 3 starter patterns: / <- start searching with the root element /html/body/div[1]/span[3] <- the first
within the inside that div find the 3rd tag // <- start searching from root, but do not list the root //span[3] <- this will find the 3rd span tag ANYWHERE on the page //div[1]/span[3] <- this will find the 3rd span tag within the 1st div tag ./ <- start searching at the current element (this assumes you have found and element previously) ./table/tr[2]/td[1] <- in the current element find the first table tag inside the table tag find the 2rd tr (table row) tag, within the row find the 1st td (table data) tag XPath also lets you search by attribute [@attribute='...'] XPath has a wild card '*' that will match ANY element(s)