You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my daily work, I often have to tweak the /etc/hosts file for routing production site URLs to the development sites for testing.
Is it possible to launch a browser instance with a set of customized host resolution rules? For example,
const browser = await chromium.launch( {
hosts: {
'example.com': '127.0.0.1', // all the request to example.com will then be routed to my local machine.
}
} );
I believe it's possible by dockerizing my playwright testing program, but would like to see if there is a lightweight solution for this.
Thanks :)
Quo0, rescribet, alshakero, clemlesne and karantan