jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "glinius@live.com" <glin...@live.com>
Subject Re: Access to local storage data.
Date Fri, 07 Jun 2019 10:58:04 GMT
As per JMeter project main page <http://jmeter.apache.org/>  :




> JMeter is not a browser, it works at protocol level. As far as
> web-services and remote services are concerned, JMeter looks like a
> browser (or rather, multiple browsers); however JMeter does not perform
> all the actions supported by browsers. In particular, JMeter does not
> execute the Javascript found in HTML pages. Nor does it render the HTML
> pages as a browser does (it's possible to view the response as HTML etc.,
> but the timings are not included in any samples, and only one sample in
> one thread is ever displayed at a time).

So if you have the value somewhere in browser session - just extract it
using  browser developer tools
<https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools>
 
and add to JMeter script. 

If you're working on JMeter integration with  Selenium
<https://www.seleniumhq.org/>  via  WebDriver Sampler
<https://www.blazemeter.com/blog/jmeter-webdriver-sampler>   - be aware that
you can manupulate  window.localStorage object
<https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage>  
using JavaScript like:


> //set value:
> WDS.browser.executeScript("localStorage.setItem('foo', 'bar')")
> //get value:
> var foo = WDS.browser.executeScript("return localStorage.getItem('foo');")

<http://www.jmeter-archive.org/file/t340375/foo.png> 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message