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
Currently the RequestUtils::setup() creates a new Context and only uses baseURL and storageState (by resolving the storageStatePath), but it does not support further options like extraHTTPHeaders or httpCredentials.
What is your proposed solution?
It would be good to enhance the RequestUtils::setup()-method by splitting up the paramaters into "browser context options"-object to support all possible options and the rest (like user) is separated.
So instead we could change it to following:
Edit: Changed from BrowserContextOptions to APIRequestContextOptions as mentioned here: #62466 (comment)
Currently, we have a test site that uses httpCredentials for access, and we are unable to pass any additional options to the setup() method. I agree with @Chrico that these options must be added, and the best case is to pass all available options to Playwright, rather than limit the options available with the WordPress E2E library.
Generally speaking, when a abstraction library is created, it is a good practice to allow passing of any additional options to the underlying library (unless there is a specific reason not to do so).
Does anyone know if there was a specific reason for not allowing all options to be passed (asking just in case there is a caveat to this approach)?
What problem does this address?
Currently the RequestUtils::setup() creates a new Context and only uses
baseURL
andstorageState
(by resolving thestorageStatePath
), but it does not support further options likeextraHTTPHeaders
orhttpCredentials
.What is your proposed solution?
It would be good to enhance the
RequestUtils::setup()
-method by splitting up the paramaters into "browser context options"-object to support all possible options and the rest (likeuser
) is separated.So instead we could change it to following:
Edit: Changed from
BrowserContextOptions
toAPIRequestContextOptions
as mentioned here: #62466 (comment)See full list of APIRequest Context Options: https://playwright.dev/docs/api/class-apirequest#api-request-new-context
The text was updated successfully, but these errors were encountered: