From: Vasudevan C. <vco...@gm...> - 2018-01-29 13:32:42
|
Hi Ronald. Setting a cookie at the client side using addCookie to the webclient after constructing a Cookie does not seem to work. I am instantiating a webClient instance with Javascript disabled. The server has sent a set of cookies which are stored in the CookieManager of the webclient instance. Now, I want to add one more cookie from the client side. I constructed the cookie using New Cookie with the necessary parameters. The domain value is set to ".naukri.com". I add the new cookie using AddCookie Method for the corresponding cookieManager. I checked through Charles if the new Cookie value is set. BUt unfortunately it is not. Am I missing something?. I am using HTMLUnit 2.23. The same set of calls worked on HtmlUnit 2.9. Appreciate your help in advance. Regards Vasu On 25 January 2018 at 01:37, Ronald Brill <rb...@rb...> wrote: > > The second question on setting a Cookie by the client using Javascript. > >Can I accomplish the same without enabling Javscript for a WebClient > > instance and set the cookie using addCookie Method. I am using 2.23 > >right now. > > I think yes; the javascript call does also calls this method with the > current page and the webclient as param > > RBRi > -------------------------- > WETATOR > Smart web application testing > http://www.wetator.org > |