Websites use cookies to store user preferences, login information, and various other details of the client. The Selenium WebDriver API provides various methods to manage these cookies during testing. Using these methods, we can read cookie values, add cookies, and delete cookies during the test. This can be used to test how the application reacts when cookies are manipulated. The WebDriver.Options
interface provides the following methods to manage cookies:
Method |
Description |
---|---|
| |
| |
| |
| |
| |
|
In this recipe, we will see how to read a cookie and...