2 added 13 characters in body
source | link

I have created ThredThread Group that contains : User Defined Variables (FedAuth_v,FedAuth1_v) User Defined Variables (FedAuth_v,FedAuth1_v) HTTP Cookie Manager (FedAuth - value:${FedAuth_v}HTTP Cookie Manager (FedAuth - value:${FedAuth_v} and FedAuth1 - value:${FedAuth1_v}FedAuth1 - value:${FedAuth1_v}

Then i Have jp@gc - WebDriver Samplerjp@gc - WebDriver Sampler with code

 var vars = org.apache.jmeter.threads.JMeterContextService.getContext().getVariables()
var cookie1=WDS.browser.manage().getCookieNamed("FedAuth").toString()
var cookie2=WDS.browser.manage().getCookieNamed("FedAuth1").toString()

vars.put('FedAuth_v',cookie1) 
vars.put('FedAuth1_v',cookie2)

After this sampler i need to use this cookies in HTTP request , but it fails and it still use initial value of FedAuth1_vFedAuth1_v and FedAuth_vFedAuth_v

Is there any way to realize it ?

To add, my HTTP Request uses https protocol, proxy. I have tried to check "secure" option in HTTP Cookie Manager but with no results.

enter image description here

I have created Thred Group that contains : User Defined Variables (FedAuth_v,FedAuth1_v) HTTP Cookie Manager (FedAuth - value:${FedAuth_v} and FedAuth1 - value:${FedAuth1_v}

Then i Have jp@gc - WebDriver Sampler with code

 var vars = org.apache.jmeter.threads.JMeterContextService.getContext().getVariables()
var cookie1=WDS.browser.manage().getCookieNamed("FedAuth").toString()
var cookie2=WDS.browser.manage().getCookieNamed("FedAuth1").toString()

vars.put('FedAuth_v',cookie1) 
vars.put('FedAuth1_v',cookie2)

After this sampler i need to use this cookies in HTTP request , but it fails and it still use initial value of FedAuth1_v and FedAuth_v

Is there any way to realize it ?

To add, my HTTP Request uses https protocol, proxy. I have tried to check "secure" option in HTTP Cookie Manager but with no results.

enter image description here

I have created Thread Group that contains : User Defined Variables (FedAuth_v,FedAuth1_v) HTTP Cookie Manager (FedAuth - value:${FedAuth_v} and FedAuth1 - value:${FedAuth1_v}

Then i Have jp@gc - WebDriver Sampler with code

 var vars = org.apache.jmeter.threads.JMeterContextService.getContext().getVariables()
var cookie1=WDS.browser.manage().getCookieNamed("FedAuth").toString()
var cookie2=WDS.browser.manage().getCookieNamed("FedAuth1").toString()

vars.put('FedAuth_v',cookie1) 
vars.put('FedAuth1_v',cookie2)

After this sampler i need to use this cookies in HTTP request , but it fails and it still use initial value of FedAuth1_v and FedAuth_v

Is there any way to realize it ?

To add, my HTTP Request uses https protocol, proxy. I have tried to check "secure" option in HTTP Cookie Manager but with no results.

enter image description here

1
source | link

How to store cookies from Webdriver Sampler in HTTP Cookie Manager - JMeter

I have created Thred Group that contains : User Defined Variables (FedAuth_v,FedAuth1_v) HTTP Cookie Manager (FedAuth - value:${FedAuth_v} and FedAuth1 - value:${FedAuth1_v}

Then i Have jp@gc - WebDriver Sampler with code

 var vars = org.apache.jmeter.threads.JMeterContextService.getContext().getVariables()
var cookie1=WDS.browser.manage().getCookieNamed("FedAuth").toString()
var cookie2=WDS.browser.manage().getCookieNamed("FedAuth1").toString()

vars.put('FedAuth_v',cookie1) 
vars.put('FedAuth1_v',cookie2)

After this sampler i need to use this cookies in HTTP request , but it fails and it still use initial value of FedAuth1_v and FedAuth_v

Is there any way to realize it ?

To add, my HTTP Request uses https protocol, proxy. I have tried to check "secure" option in HTTP Cookie Manager but with no results.

enter image description here