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
86 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,010 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,800 points
88 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,800 points
97 views
0 votes
1 answer
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
2,182 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,870 points
1,810 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,870 points
1,789 views
0 votes
1 answer
0 votes
1 answer