Which methods can be used to handle cookies in Python Webdriver?

0 votes
Which methods can be used to handle cookies in Python Webdriver?
Jul 31 in Selenium by Audrey
27 views

1 answer to this question.

0 votes

Hi Audrey, you can use following methods to handle cookies in Python Selenium Webdriver:

driver.get("https://www.flipkart.com")

driver.get_cookies()
driver.get_cookie('past_orders')
cookie = {'name' : 'cart_order', 'value' : 'Iphone'}
driver.add_cookie(cookie)
driver.delete_cookie('past_orders')
driver.delete_all_cookies()

answered Jul 31 by Jasprit

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8 in Selenium by Anvi
• 13,400 points
169 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
755 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
999 views
0 votes
1 answer

Assertions in Selenium can be used in which all modes?

Hello Gauri, Assertions in selenium can be used ...READ MORE

answered May 14 in Selenium by Pratibha
• 3,180 points
30 views
0 votes
1 answer