I have been attempting to use JMeter’s XPath extractor for a while now, and have been unable extract anything at all.
I have been using Firebug to give me the XPath of a link by right-clicking on a->Copy XPath which gives me the following
/html/body/div[4]/div/div[4]/div/div[2]/div/div[3]/div/a.
I have been testing this (/html/body/div[4]/div/div[4]/div/div[2]/div/div[3]/div/a/@href) in Firefox’s XPath Checker which successfully returns all the links on the page.
I am fairly certain that my problem is with JMeter, and not my XPath syntax etc.
Has anyone else had similar problems?
1. *First of all:* since you are using XPath Extractor to parse HTML (not XML) response ensure that Use Tidy (tolerant parser) option is CHECKED (in XPath Extractor’s control panel).
2. XPath query like your above (
/html/body/div[4]/div/div[4]/div/div[2]/div/div[3]/div/a/@href) looks not very accurate. Suppose you can try to use something like the following: