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, 2019 in Selenium by Audrey
99 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, 2019 by Jasprit

Related Questions In Selenium

0 votes
1 answer

Which methods which can be used to handle pop-up and alerts in Python Selenium Webdriver?

Hey Kishor, Python Selenium webdriver provides following ...READ MORE

answered Jul 29, 2019 in Selenium by Abha
• 27,930 points
81 views
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, 2019 in Selenium by Anvi
• 14,090 points
2,445 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,510 points
3,133 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,890 points
2,365 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, 2019 in Selenium by Pratibha
• 3,690 points
77 views
0 votes
1 answer

What is Marionette driver and how it can be used to instantiate Firefox webdriver?

Hey Manju, Marionette driver is the new driver ...READ MORE

answered Jul 15, 2019 in Selenium by Anvi
• 14,090 points
624 views