Handing Cookies in Selenium Automated Tests

1 Year Subscription

qautomation news

QAutomation News / By  Andreea Draniceanu

Cookies, or HTTP cookies, are pieces of data stored on the user’s computer containing information about the user and the user’s preference on a specific website. For example, a cookie can store the authentication information of the user or session information such as browsing history, so the website can improve the user’s experience based on their preferences.

In this article, we’ll see the commands used for working with cookies in Selenium.

Why we need to work with cookies in Selenium 🍪

One of the good practices in test automation states that each test should focus on only one functionality. This means that we don’t want our tests to perform too many actions through the UI before we get to the actual condition we want to verify. Let’s look at an example: you’re trying to test items added to the cart that can be ordered in an e-commerce application. But to finalize the purchase, you…



UCSD DevOps CICD

Continue reading on source link

Leave a Comment

Your email address will not be published. Required fields are marked *

4 + 1 =