Reputation: 558
I'm writing a bunch of automated tests using selenium and one of the tests requires user authentication. After entering user's credentials (email and password) I need to wait for the process of authentication to complete. So basically it boils down to waiting for the server to respond with an Auth cookie. But how do I get it?
I tried searching on the Internet but didn't find anything that answers that question. If I do driver.get_cookies()
it returns a whole bunch of them, which one of them should I use then?
Upvotes: 1
Views: 1335
Reputation: 3927
driver.manage().getCookies();
will provide Set of cookies used or available at that instance. You have to cross check which cookie is responsible for what and use it.
As knows driver.manage().addCookie(arg0)
is used to add required cookies, if you what get required cookies then driver.manage().getCookieNamed(arg0)
Upvotes: 4