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 18, 2019 in Selenium by Nisha
353 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,040 points
300 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,040 points
224 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,520 points
5,312 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,050 points
5,992 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
3,711 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 2, 2020 in Selenium by Sri
• 3,050 points
4,501 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 15, 2020 in Selenium by Roshni
• 10,460 points
20,047 views
0 votes
1 answer