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
helpers: {
Playwright: {
browser: 'chromium',
url: '***',
show: true,
keepBrowserState: true, // This ensures cookies and session are maintained across scenarios
restart: false, // Prevents browser from restarting after each scenario
keepCookies: true,
}
}
I have given restart as 'false' but still the browser is getting relaunched after every scenario
The text was updated successfully, but these errors were encountered:
hey @FathimaAfshan, indeed I fixed it for myself using restart:‘keep’ (and keepBrowserState and keepCookies set to true as well). Additionally, my issue was I used I.amOnPage('/') in the Background section, which caused the browser to reload (not close the window, but reload the page, which also broke my test workflow). The best results gave me config as aforementioned and setting a flag in Before hook:
let pageLoaded = false;
Before(({ I }) => {
if (!pageLoaded) {
I.amOnPage('/');
pageLoaded = true;
}
});
helpers: {
Playwright: {
browser: 'chromium',
url: '***',
show: true,
keepBrowserState: true, // This ensures cookies and session are maintained across scenarios
restart: false, // Prevents browser from restarting after each scenario
keepCookies: true,
}
}
I have given restart as 'false' but still the browser is getting relaunched after every scenario
The text was updated successfully, but these errors were encountered: