DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37183>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37183 Summary: [PATCH] New XPathResponse function to extract data from Response Product: JMeter Version: Nightly (Please specify date) Platform: Other OS/Version: other Status: NEW Severity: enhancement Priority: P5 Component: Main AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Hi folks! I created a new JMeter function, that allow to extract value from HTML response using XPath query. This way it should be much more reliable to obtain values of select/option etc than making complex regex. This function is complement to existing XPath function - that is capable to query files only. Typical usage: ${__XPathResponse(/html/head/title,myTitle)} - extracts Title from HTML response and put it to myTitle variable ${__XPathResponse(//[EMAIL PROTECTED]'countryForm']//[EMAIL PROTECTED]'country']/option [text()='Czech Republic'])/@value} - extracts value attribute of option element that match text 'Czech Republic'. It is very handy feature when we know text of option element but need to get its value (usually some numerical id from database). Bugs/notes: * no DOM caching - DOM tree is created on every function invocation * need to do better exception handling It would be nice to have handy response.getDataAsDomHtml() or similar to create DOM on demand for every possible caller (XPathAssertion, XPathResponse etc..), but currently I have no idea, what would be acceptable solution. Any idea? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
