Usually with a web browser it creates the document for you. Jmeter isn't a web browser, but the javascript library should be complete. I haven't tried it myself because I always use Xpath, but I bet you could create a DOM document from a string and then use DOM to access the elements after that.
http://www.w3schools.com/dom/dom_parser.asp See the bit on loading an XML element from string. Given an http request element in Jmeter, if you add a post-processor to load the entire http response into a variable (I think a regex with .* will work,) you could then try to use this method to create a document from the response string. I'd honestly be surprised if it doesn't work, though it might take a little tinkering to get it completely correct. On Thu, Mar 29, 2012 at 3:00 AM, Shay Ginsbourg <[email protected]>wrote: > Can Jmeter access any "document.method" at all ? I guess not. > > Shay > > > > > > On Thu, Mar 29, 2012 at 10:42, vineeth <[email protected]> wrote: > > > Thanks Bruce. I will definitely try that. But I want to know if it can be > > done using javascript? > > > > Shmuel > > > > In javascript we have 'document.getElementById("id")' > > > > Using this we can extract the elements using their ids. > > Similarly is there any way in JMeter to achieve this? > > > > -- > > View this message in context: > > > http://jmeter.512774.n5.nabble.com/Accessing-DOM-using-JMeter-tp5600242p5603032.html > > Sent from the JMeter - User mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > -- > > > Regulatory, Medical & Performance Testing Services: > > > * IEC 62304 Medical Device Software Life Cycle > > * IEEE 829 Software Test Documentation > > * ISO 14971 Medical Device Risk Management > > * FDA 21 CFR Part 11 Software Validation > > * IEC 60601-1:2005 3rd ED PEMS - Medical Electrical Equipment > > * End-to-end verification, validation, and testing (VV&T) > > * High quality service for FDA and CE submissions > > * Reliable open source free testing tools > > * Optional functionality and regression testing > > * Software Performance & Load Testing > > * Software Testing Advanced Automation > > * Medical Software Verification & Validation > > * Medical Device Verification & Validation > > * Medical Device Regulatory Submission > > * Organizational Regulatory Qualification > > > > Shay Ginsbourg > > Regulatory & Testing Affairs Consultant > > > > Formerly QA Manager of LoadRunner at Mercury Interactive > > > M.Sc. cum laude in Bio-Medical Engineering > > M.Sc. in Mechanical Engineering > > > > > Work: 035185873 > > Mobile: 0546690915 > > > Email: [email protected] > > > http://il.linkedin.com/in/shayginsbourg > > > WWW.GINSBOURG.COM > > > > > > Please consider your environmental responsibility before printing this > e-mail. > -- Bruce Ide [email protected]
