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
195 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,110 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
• 27,930 points
211 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
• 27,930 points
150 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
3,790 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31 in Selenium by Sri
• 2,970 points
4,774 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
2,750 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 in Selenium by Sri
• 2,970 points
3,113 views
0 votes
1 answer
0 votes
1 answer