fix: playwright timeout sessions with provide opt-out params #1196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, this PR is to provide opt-out solution for issues; #1185 and #994
PROBLEMS
when I try to figure out what is happening, most of the time the sessions is not long enough to handle the navigation process. This issue appear due to some problems such as; lack of resources when run the script, too much sessions to handle (ex: run alot of script once in a time), and another process block the session to finish.
SOLUTION
By default, playwright timeout sessions is 3000ms == 30 seconds. For those problems above, this default timeouts is not enough. So with opt-out the timeout params via creating session , we can override default playwright timeout sessions before navigation started.
IMPLEMENTATION
This PR basically adding opt-out params when creating session. ex:
this will let playwirght session started with 60secs timeout instead of 30s by default.