Posts

Showing posts with the label cookies

JMeter fails on beanshell imports

Image
JMeter fails on beanshell imports I had been using Beanshell pre-processor to add custom cookies created through javascript. While it used to work perfectly earlier, with the same line of codes I started to recieve errors in my pre-processor. ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.protocol.http.control.CookieManager; import org.apache. . . . '' : TargetError WARN - jmeter.modifiers.BeanShellPreProcessor: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.protocol.http.control.CookieManager; import org.apache. . . . '' : TargetError The lines of code is as per suggestion provided in https://javaworks.wordpress.com/2011/08/05/setting-cookie-in-jmeter/ import org.apache.jmeter.protocol.http.control.CookieManager; import org.apache.jmeter.protocol.http.control....

Manually add a cookie in browser session in iE

Image
Manually add a cookie in browser session in iE I want to add a cookie to the browser's session for testing that particular page. I am able to do that in Chrome and Firefox, as there is an option to add a cookie manually in the Developer tools -> Application -> Cookies. But in IE there is no particular way to add a cookie. Is there any way I can do that in IE? . This is what I have tried so far. From suggestions from a few people, I tried to do the following. 1) Use javascript:document.cookie="NAME=VALUE" in the page I want to add a cookie. When I refresh the page, I don't find the cookie anymore. javascript:document.cookie="NAME=VALUE" 2) Also tried after the page loaded to do document.cookie="NAME=VALUE" in the console. document.cookie="NAME=VALUE" Both of the solutions doesn't seem to work. Any help is appreciated. 1 Answer 1 Just add it...