How to send cookies with selenium webdriver?

Create cookies using the Java API as follows:

Cookie ck = new Cookie("name", "value");
driver.manage().addCookie(ck);

Create cookies using the Python API as follows:

driver.add_cookie({'name': 'foo', 'value': 'bar'})

Leave a Comment