about 4 years ago
User can handle the cookies in Selenium WebDriver. Here, we discuss this in detail:
1. Add Cookie: User can add a specific cookie. Also, if the cookie's domain name left blank then it will be assumed that cookie is meant for the domain of the current document.
Method Name:addCookie(Cookie cookie)
Parameters: cookie - Name of the cookie to add.
2. Delete Cookie: User can delete a cookie.
Method Name: deleteCookie(Cookie cookie)
3. Delete Cookie with Name: User can delete the specific cookie by given its name.
Method Name: deleteCookieNamed(java.lang.String name)
Parameters: The name of the cookie to delete
4. Delete All Cookies: User can delete all cookies from the current domain.
Method Name: deleteAllCookies()
5. Get Cookies: User can get all cookies from the current domain.
Method Name: getCookies()
Returns: Set of cookies for the current domain.
6. Get the Cookie with Specific Name: User can get a specific cookie by given its name.
Method Name: getCookieNamed(java.lang.String name)
Parameters: name - the name of the cookie
Returns: It returns the cookie value according to the given cookie name. Also, if not found then it will return null.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2020 FindNerd.com. All rights reserved.
Sign up using