Request: Write cookie option
Bug #1159980 reported by
Nicholas Bencriscutto
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
selenium-simple-test |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Currently I can get the cookies, but the webpage I am testing if I go back to the /login it deletes the local cookies.
I want to be able to login, grab the cookies then open re open the browser for other parts of my testing framework. If I reopen the browser and hit the webpage again it forces me back to /login... since I already have the cookie I would like a write_cookie function that will write the cookie pending which browser I am using.
Changed in selenium-simple-test: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
To post a comment you must log in.
this should be easy to add.
selenium has and `add_cookie` method we can use.
----
add_cookie(self, cookie_dict)
Adds a cookie to your current session.
:Args:
- cookie_dict: A dictionary object, with required keys - "name" and "value";
optional keys - "path", "domain", "secure", "expiry"
Usage: add_cookie( {'name' : 'foo', 'value' : 'bar'}) add_cookie( {'name' : 'foo', 'value' : 'bar', 'path' : '/'}) add_cookie( {'name' : 'foo', 'value' : 'bar', 'path' : '/', 'secure':True})
driver.
driver.
driver.