What are the commonly used Selenium Webdriver commands to manage cookies

0 votes
What are the commonly used Selenium Webdriver commands to manage cookies?
Jun 19, 2019 in Selenium by Nisha
450 views

1 answer to this question.

0 votes

Hi Nisha, some of the most commonly used Selenium Webdriver commands to manage cookies are:

  1. Get Cookies: Used to return the list of all Cookies stored in web browser.
    manage().getCookies();

  2. Get Cookies by name: Returns the specific cookie according to its name.
    manage().getCookieNamed(arg0);

  3. Add Cookies: It is used to create and add the cookie.
    manage().addCookie(arg0)

  4. Delete Cookies: Used to delete a specific cookie.
    manage().deleteCookie(arg0);

  5. Delete Cookies by name: This is used to delete a cookie according to its name.
    manage().deleteCookieNamed(arg0);

  6. Delete All Cookies: This statement is used to delete all cookies. 
    manage().deleteAllCookies();

answered Jun 19, 2019 by Anvi
• 14,150 points

Related Questions In Selenium

0 votes
1 answer

What are some of the most commonly used WebElement commands for Selenium Webdriver?

 Hey Rupali, some of the most commonly ...READ MORE

answered May 14, 2019 in Selenium by Abha
• 28,060 points
367 views
0 votes
1 answer

What are some of the browser commands used in Selenium Webdriver?

Hi Nakul, some of the most frequently ...READ MORE

answered May 14, 2019 in Selenium by Abha
• 28,060 points
283 views
0 votes
1 answer
0 votes
2 answers

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,500 points
6,232 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
6,590 views
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
4,218 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
5,215 views
0 votes
3 answers

What are the different ways to select an option from a dropdown using Selenium Webdriver?

So follow this steps for solution: First click ...READ MORE

answered Dec 16, 2020 in Selenium by Roshni
• 10,480 points
26,777 views
0 votes
1 answer