createRequest for HTMLUnit/Selenium should capture cookies
Bug #437326 reported by
edA-qa
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TestPlan |
New
|
Undecided
|
Unassigned |
Bug Description
The functions to create requests should try and add the cookies to the request. This would imply also that getRequest should send those cookies.
The motivation is that a website which has JSON calls which require the cookies to be set should be directly testable. This is more an issue for Selenium however, since HTMLUnit allows the results to appear and be used directly from the browser anyways.
To post a comment you must log in.
this may not be so simple for two reasons:
1) there are only the very specific getClickRequest and getSubmitRequest, which while should obtain the cookies, they won't necessarily meet the objective (a further way to get a generic GotoURL request is needed)
2) in firefox the "document.cookie" parameter doesn't actually expose all the cookies that will be sent, but only those that are actually set on the current domain. For example on example.com only those on example.com are retrieved, not those on ".example.com"