The proxy just stores and replays whatever the browser gets/requests. So it doesnt matter how the cookies are set , as long as the browser sends the cookie , the proxy will record it. This is not the case when you actually run the test - here the fact that Jmeter doesnt execute javascript becomes important
On Wed, Apr 3, 2013 at 3:04 PM, Gavin Maselino <[email protected]>wrote: > Hi > > Again thanks for the clarification on JS-set cookies. > > Just out of curiosity - how is it that when i recorded the script, Jmeter > generated a Get request with parameters, that included the cookie data, > especially if that cookie was set by JavaScript? > > > On 3 Apr 2013, at 21:02, "Deepak Shetty" <[email protected]> wrote: > > > your subject(Extracting Cookie created via Javascript) doesnt match the > > rest of your message > > If a cookie is being set by javascript then you will need to add it by > > beanshell or equivalent - The first message you sent however specified > > nothing of that sort - if the cookie is set via javscript then there wont > > be any set-cookie header. > > > > > > On Wed, Apr 3, 2013 at 12:51 PM, Gavin Maselino > > <[email protected]>wrote: > > > >> Hi guys > >> > >> Thanks for the response. > >> I've already got the Cookie Manager at the thread group level. But I'll > >> explore the set-cookie response. Failing that I've seen some posts about > >> setting your own cookie using BeanShell which I can try. > >> > >> Thanks > >> > >> > >> > >> On 3 Apr 2013, at 18:05, "Mark Miller" <[email protected]> wrote: > >> > >>> It sounds like you are focused on the request headers. I expect to > >>> find a set-cookie > >>> *response *header resulting from on one of the HTTP requests and use a > >> post > >>> processor regex extractor to pull it from the headers off that sampler. > >>> > >>> But I have no direct experience with SalesForce. > >>> > >>> (Also echoing Flavio's direction with the Cookie Manager test element). > >>> > >>> Mark > >>> > >>> > >>> On Wed, Apr 3, 2013 at 10:44 AM, Flavio Cysne <[email protected]> > >> wrote: > >>> > >>>> Did you add an HTTP Cookies Manager to your JMeter script? You'll need > >> it > >>>> to let JMeter control cookies. > >>>> > >>>> > >>>> 2013/4/3 Gavin Maselino <[email protected]> > >>>> > >>>>> Hi > >>>>> So I recorded a login action on a SalesForce-built app (Apex, JS > etc). > >>>> One > >>>>> of the HTTP requests recorded (a security .jsp page) was a GET > request > >>>> that > >>>>> had the cookie parameters. > >>>>> On Firebug, in the 'Net' tab under 'Headers' I can see the cookie > data > >> in > >>>>> the Request Headers section (cookie data is in the login form HTML > >> page). > >>>>> For the identical page/request in JMeter I have looked at the Request > >> Tab > >>>>> that I would expect the cookie data to be displayed in and it just > >> reads > >>>>> '[No cookies]'. > >>>>> So to conclude, JMeter has found the cookie data (and recorded it in > >> the > >>>>> GET request) yet that cookie data cannot be found in the Request tab > or > >>>> the > >>>>> Response data tab in any previous request in JMeter. All requests > have > >>>>> 'Follow Redirects' checked and 'Redirect Automatically' unchecked. I > >>>> have > >>>>> tried every option of the Cookie Policy as well. > >>>>> So, how do I find the cookie data so I can extract this? > >>>>> Thanks in advance. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
