From: Vasudevan C. <vco...@gm...> - 2018-01-30 13:40:16
|
Hi Ronald, Today, I tried creating the Cookie with the host name. That cookie value was getting set and sent to the host also. Looks like the Cookie should have the host name set instead of partial host name. Thanks for the pointer. Regards Vasu On 30 January 2018 at 01:19, Ronald Brill <rb...@rb...> wrote: > > Setting a cookie at the client side using addCookie to the webclient > >after constructing a Cookie does not seem to work. > > Sorry but i can only guess. the version you are using is realy outdated > and i have no time to support this version. > > > 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. > > Sounds good so far. Set a breakpoint CookieManager.getCookies() and check > if you cookie is part of the result. > If yes try to figure out who of the following calls ignors your one (might > be HttpClient) > Try with cookie with host name also > > ronald > > > > > 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 > >> > > > > > > |