>I'm trying the get the value of line 15 of the pasted code, but this line is present only on firefox. FF shows you the "generated" page source i.e. the value of the DOM tree as it exists - Jmeter however models an HTTP Request-Response. If you use something like say Fiddler(a proxy) and then view the request/response in that , you will get a better idea of what and from where you need to extract data
>I think JMeter isn't processing the javascript code and it's the reason why firefox Correct JMeter is not a browser >Is there a way to make it execute the javascript and then use this "new document body" No easy way. usually you have to do one of two things - identify the area of the script that is doing something and then extract data from the Javascript(for e.g. when it is appending data to the HTML there is usally someplace the Javascript is reading from a javascript variable, an ajax call etc) or replicate the javascript in code (e.g. encoding a value in some way). It gets more complicated with frameworks (like DOJO) - youll have to see where/how this id is getting added. as mentioned use a proxy and see all the request/responses. Usually if you have too many of these , its probably better to move to tools that try to emulate a browser (like Selenium or something like http://jmeter-plugins.org/wiki/WebDriverSampler/) On Wed, Jun 3, 2015 at 6:32 AM, Ranieri Mazili <[email protected]> wrote: > Hello, > > I'm trying to extract a value on document body after a HTTP Request, but > strange things are happening. > > 1) The returned document body from JMeter HTTP Request is a little bit > different from what I see on browser (Firefox). You can look the pieces of > codes at: http://paste.ofcode.org/MwrRky9aFw6XBeU4VdxJpF > I'm trying the get the value of line 15 of the pasted code, but this line > is present only on firefox. > P.S: To extract this value, I'm using "Regular Expression Extractor" with > the following expression: id="uniqName_2_0" value="(\d+)" > > 2) Some parts of this HTML code are generated on client side (javascript), > I think JMeter isn't processing the javascript code and it's the reason why > firefox and JMeter document body are different. Is there a way to make it > execute the javascript and then use this "new document body" to extract the > value that I need? > > I really appreciate any help. > > Thanks > > -- > Ranieri >
