HTTP authentication:
HTTP provides a general framework for access control and authentication. This page is an introduction to the HTTP framework for authentication, and shows how to restrict access to your server using the HTTP "Basic" schema.
Reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication
https://playwright.dev/docs/network
Source code:
https://github.com/ortoniKC/Playwright-Test-Runner/
Sample code:
const context = await browser.newContext({
httpCredentials: {
username: "admin",
password: "admin"
}
})
--------------------------Thank you---------------------------
Thanks for watching, if you like the video, give it a thumbs up 👆.
Sharing is caring, kindly share the video with your friends and colleagues.
Don't forget to subscribe and hit the bell 🔔 notification.
--------------------------------SOCIAL--------------------------------
📝Test Practice Site: https://letcode.in/
👥Facebook Group: https://www.facebook.com/groups/letcode
🐦Gitter: https://gitter.im/letcode-selenium/community#share
📸Instagram: https://www.instagram.com/letcode.in/
🎓 LinkedIn: https://www.linkedin.com/in/ortoni/
⛳️ XPath Extension: https://bit.ly/2T5EUCu
Join our WhatsApp group.
http://bit.ly/3cSPCpm
#letcode