codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.11k stars 724 forks source link

Launch persistent context using a temporary directory #3546

Open kenz-lu opened 1 year ago

kenz-lu commented 1 year ago

What are you trying to achieve?

Launch persistent context in Playwright using a temporary directory by passing an empty string to userDataDir. (Playwright documentation: https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)

What do you get instead?

Playwright browser does not launch using persistent context

Details

kenz-lu commented 1 year ago

I believe this is the cause? https://github.com/codeceptjs/CodeceptJS/blob/c79a0c6b85ceceddeff8417c696511f016ef4555/lib/helper/Playwright.js#L729-L733

khanguy00 commented 1 year ago

Sounds like if (typeof this.userDataDir !== 'undefined') should solve the issue?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 90 days with no activity.