Allow to configure options (aka capabilities) such as proxy and acceptInsecureCerts per user context rather than per session, so that same browser process can be reused for testing with different options.
We could use the capabilities as default settings, and allow to override those when creating a new user context by specifying new values via optional arguments.
Note that it's not clear if all those settings can be actually handled per user context for all the browsers.
The Browser Testing and Tools Working Group just discussed Allow browser configuration by user context and not only globally.
The full IRC log of that discussion
<simonstewart> Topic: Allow browser configuration by user context and not only globally
<simonstewart> github: https://github.com/w3c/webdriver-bidi/issues/789
<simonstewart> jgraham: some people would like to treat different user contexts as completely separate sessions so that they can have a single browser process
<simonstewart> jgraham: from a gecko point of view, I don't think we can implement this in general
<simonstewart> jgraham: we use containers, which are extra attributes on storage. I don't think we have proxies per user context, etc
<simonstewart> gsnedders: we already create a separate NSURLSession for ephemeral browsing contexts, so I think we should be able to configure the NSURLSessions we're using for each top-level navigable separately. However, I'm not totally sure
<gsnedders> s/for ephemeral browsing context/for each ephemeral browsing contexts/
<simonstewart> simonstewart: presumably this is for "speed"?
<simonstewart> <general agreement>
<simonstewart> sadym: for use, proxies are per process.
<simonstewart> sadym: accepting insecure certs, we can per user context
<simonstewart> sadym: ah! You can set proxy
<simonstewart> jgraham: the thing we can do here is to add some configuration options to create user context, which are roughly equivalent to ones from capabilities that we can set.
<simonstewart> jgraham: per thing we try and set, we need to check whether or not it's possible for people to do
<simonstewart> sadym: do we want to use capabilities when creating user contexts?
<simonstewart> jgraham: very much no
<simonstewart> jgraham: you can always return "unsupported operation" if someone asks for something you can't implement
<simonstewart> simonstewart: we may just want to limit the capabilities we can pass through
<simonstewart> jgraham: yes, to the things in capabilities that are configuration values
<simonstewart> simonstewart: limiting to useInsecureCerts and proxy seems like something people can implement
<simonstewart> sadym: unhandledPromptHandling too
<AutomatedTester> RRSAgent: make minutes
<RRSAgent> I have made the request to generate https://www.w3.org/2024/09/27-webdriver-minutes.html AutomatedTester
This is a request coming from Playwright:
We could use the capabilities as default settings, and allow to override those when creating a new user context by specifying new values via optional arguments.
Note that it's not clear if all those settings can be actually handled per user context for all the browsers.