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 in Selenium by Nisha
25 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 by Anvi
• 11,690 points

Related Questions In Selenium

0 votes
1 answer
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 in Selenium by Abha
• 19,440 points
39 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,050 points
413 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,130 points
772 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,130 points
408 views
0 votes
1 answer