Adding a cookie for another domain
QuizMediumAsked in: Infosys
The browser is on http://localhost:8000. The test adds a cookie with domain example.com. What happens?
- InvalidCookieDomainException: you can only add cookies for the domain of the current page
- The cookie is stored and sent the next time you visit example.com
- The cookie is silently ignored
- The browser navigates to example.com to store it
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.