07:38:48 RRSAgent has joined #webdriver 07:38:52 logging to https://www.w3.org/2023/09/15-webdriver-irc 07:38:53 Zakim has joined #webdriver 07:39:16 present+ 07:39:18 present+ 07:39:19 present+ 07:39:21 Meeting: Browser Tools & Testing @ TPAC 2023 - Day 2 07:39:31 present+ 07:39:45 Chair: David Burns 07:39:58 present+ 07:40:05 present+ 07:40:06 present+ 07:40:06 present+ 07:40:17 present+ 07:40:20 Topic: Consider whether to allow multiple sessions in browsers 07:40:29 github: https://github.com/w3c/webdriver-bidi/issues/103 07:42:06 ScribeNick: shs96c 07:42:17 q? 07:42:27 present+ 07:42:37 RRSAgent: make minutes 07:42:38 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html jgraham 07:42:51 q+ 07:43:45 jgraham: the original issue was that Classic only allowed on session. With bidi, we could have one tool running tests, and another constructing HAR files from network traffic. 07:43:54 q+ 07:44:07 jgraham: obvious way to support this is to have more than one session connecting to a browser. 07:44:59 jgraham: the spec theoretically currently assumes this is the case. There's a PR that never landed in Classic to make this actually work, since the spec currently uses Classic's definition of a session 07:45:06 ack orkon 07:45:47 q+ 07:46:02 orkon: in puppeteer, we can connect to a running browser. Want to clarify status. Maybe not use `session.new`, but `session.connect` to connect to a running browser. Why? Because you can't change capabilities of a running session, so connecting is a different workflow 07:46:09 ack AutomatedTester 07:47:19 q+ 07:47:20 AutomatedTester: this is something we are going to need to do. Potential overlap between sandboxing and multiple sessions. The use case I'd like to support is to create a sandbox tab and have a session per tab, so a client can run tests in parallel more quickly. This is something that Playwright does. 07:47:21 q+ 07:47:34 ack jgraham 07:48:06 q+ 07:48:32 jgraham: about session.new I don't think it's necessary to have a new command. You can always fail to create a session if you're trying to change the capabilities of a running browser in a way that's not supported. 07:49:44 jgraham: I agree that conceptually there are two different operations (starting and connecting to a browser process) Historically we've done this to make the protocol more RAII. Adding a new command feels unnecessary. 07:50:51 jgraham: we should get to this point when we come back to sandboxing. There seem to be two different ideas about how this might work. Need to allow complete access to a running session (eg. to capture network traffic, or monitor windows) 07:50:53 ack whimboo 07:50:54 ack next 07:51:10 qq+ orkon 07:52:39 whimboo: we also have situations where you are running a browser and later connect. In our case, we've seen people are running the browser with the protocol active, but without a current session. We would still be able to pass in capabilities. This new session would definitely want to set capabilities. 07:53:11 whimboo: so we could probably move this to the later sandbox discussion 07:54:22 ack next 07:54:23 orkon, you wanted to react to orkon 07:54:33 q+ 07:54:45 orkon: I think that after hearing the arguments, an extra command is unnecessary. Some capabilities are sent to the browser, some to the session, and some to both. Wanted to mention about the sandbox discussion we had yesterday. That doesn't require you to have a separate bidi session. We can discuss that later 07:54:51 ack next 07:55:48 q+ Sam Sneddon [:gsnedders] 07:55:56 ack whimboo 07:56:50 whimboo: when we want front end sessions to connect with capabilities. Will they be overridden by the new session? If a new session that wants to connect can't do this, how should it fail? 07:57:26 q+ 07:57:38 ack Sam Sneddon [:gsnedders] 07:58:26 I think we do need a way to distinguish whether a new session is being connected, because the local end probably cares about whether they're getting a browser in a clean state or not. 07:58:38 q+ 07:58:48 I don't care whether that's via a new command or a capability or whatever, but I think it's important that it is distinguishable 07:58:53 ack next 07:59:13 ack next 07:59:21 ack next 07:59:35 ack 07:59:39 * ack next 07:59:45 ack next 08:01:15 jgraham: regarding capabilities: you can fail the session on creation if the session can't be created. The spec is reasonably clear about those cases. In terms of needing to know whether you're getting a new browser instance or not, the local end would be in control of that, as it would know whether it was trying to connect to an existing browser instance or whether it was trying to connect to an existing one. 08:01:25 if you're trying to run tests in parallel, you might not know that. imagine Selenium with Python and pytest and pytest-xdist. 08:01:41 jgraham: I assume clients would make it clear to users which it was trying to do (connect to new or existing browser) 08:02:29 jgraham: The service would make it clear whether you're getting an existing browser or not. Not sure what would happen at the protocol layer to support that. 08:03:04 q+ 08:03:04 spectranaut_ has joined #webdriver 08:03:04 jgraham: if you're connecting to an existing browser, presumably you could query to find out open windows, or such 08:03:04 jamesn has joined #webdriver 08:03:04 ack next 08:03:08 scribe: automatedtester 08:03:33 Sam Sneddon [:gsnedders]: I'm imagining that, but I don't quite see the case where it would be a problem. 08:03:41 shs96c: the problem that can arise with selenium providers in the cloud. There is no guarantee that the routing will get to a running machine 08:03:53 ... I think we should solve this at a protocol level so we can handle this 08:04:23 ... we can have a session.connect that can put it to the right machine 08:04:52 ... I can see that I would want to connect a test and handle things and then the provider to have a internal tool for building HARs 08:05:11 jgraham: if you have the session I can't see this being an issue 08:06:13 shs96c: In the network intercept module to change things and then the provider to also have a session in to collect this info 08:06:21 jgraham: I can see that then 08:06:55 shs96c: the routing in a cloud provider is why we shouldnt have a new command 08:07:08 s/shouldn't/should/ 08:07:15 s/shouldnt/should/ 08:07:21 Specifically the thing that makes sense to me is that there might be a situation where you want different clients to get different events, even if you can share session ids. 08:07:44 q? 08:07:51 ack next 08:08:18 q+ 08:08:28 orkon: regarding Sam Sneddon [:gsnedders] question. I think it would be really useful to be able to show how many connections are available 08:08:37 ... then you can see if you are getting a "fresh" browser 08:08:37 orkon: it would be really useful if the response to new session tells you which sessions are already available in the instance. Then you can tell whether you're "alone" 08:08:49 scribe: shs96c 08:09:08 orkon: unsure about using session id for routing, you would get a different socket url 08:09:34 shs96c: traditionally, all cloud providers have used session id as a routing key 08:09:41 q? 08:10:48 AutomatedTester: generally what happens is that a client connects to a hub. The hub then attempts to find the closest new machine, and then will route commands to that. Will do that over websockets using forwarding of commands. Any messages coming back are sent to the local end. 08:11:31 q? 08:11:41 ack next 08:13:10 jgraham: I'm a little nervous about returning "there are N open sessions" It feels like it should be opaque to you that there are other sessions. You can't leak the session IDs. It's not obviously a security concern to know whether there's another session, but it's not the information you care about. 08:13:11 q+ 08:13:56 jgraham: you probably want to know the state that the browser is in, and we have commands for that. If you expect the browser in a specific state, then your tests should query the session to ensure that, rather than assuming some default base case. 08:15:02 jgraham: we could make this work with a single command, even in the cloud case (eg. by providing an existing session id as a capability, and returning a new session only if there's an existing session with that id) 08:15:23 jgraham: for the local use case, forcing the design to support the remote use case seems like a lot of work 08:15:45 ack next 08:17:54 q+ 08:17:55 q+ 08:19:26 shs96c: two points. 1/ sessions should be opaque to each other so that cloud providers can (eg) monitor sessions without users being aware that the monitoring is happening. 2/ disambiguating connect from new session is useful for a number of reasons, such as memory footprint (capabilities can be large if there's a profile in there), and so that it's crystal clear in logs what was happening 08:19:33 ack next 08:20:47 jgraham: your use case of cloud provider running a session and you don't need to know about that suggests there are cases that users will want to run "new session" 08:22:24 jgraham: cloud providers might have a pool of "warm" sessions ready to go, so I think new session should work to connect to an existing browser. There may be a use case for connect for cloud service providers, specifically for cloud service providers, where you might only know the session id. 08:22:24 ack orkon 08:22:24 q+ 08:23:30 orkon: I feel that the problem is a bit related to the fact that `new session` does multiple things. It not only creates a new session, but is also responsible for launching a browser. If we separated these cases, we could launch the browser without any sessions, and then we could create a new session. Third use case would be about creating a session 08:23:52 jgraham: there's nothing in the spec that says that new session will launch the browser. 08:24:25 jgraham: with WPT the typical thing we do is that we pre-launch the browsers, and then create a webdriver session. That allows us to have a pool of browsers waiting. 08:24:53 jgraham: there's nothing in the spec that requires new session to start a browser, but that's typically what we do. Cloud providers might also maintain a pool of instances. 08:25:16 orkon: from the perspective of cloud providers, don't they want some way to get a browser to be launched. 08:26:08 jgraham: new session just somehow makes the session available. Describes typical local workflow, where the command finds a driver binary, starts it, and then that starts a browser. But there's nothing in the spec that says that has to happen 08:26:17 q+ 08:26:24 ack AutomatedTester 08:27:41 AutomatedTester: when it comes to cloud providers, we can't necessarily have a warm pool to connect to, because one of the key things is that people want to amend the `new session` requests on startup. If the browser is already started, you need to restart the browser, so it doesn't make sense to have a pool. You also can't ever trust the previous session, so you have to clean up the entire OS (eg. by rolling back to a previous OS snapshot, or 08:27:41 starting a clean container) 08:28:06 I didn't mean to suggest that there was necessarily going to be a warm pool, just that it seems like a valid optimization (e.g. wpt has exactly this optimisation for Firefox instances). Maybe cloud providers aren't the best example here. 08:29:12 AutomatedTester: I don't think we can connect to something that's already spun up in that sense. But there are going to be times when we want to (eg) collect all the logs or performance data, so that we can build in features that customers might want. But the end user clients are likely going to just want a clean session. If they find out other sessions are connected, they'll want to know why. If customers have a sense that their sessions 08:29:12 aren't entirely there, they'll lose trust in the service. 08:29:57 qq+ 08:31:47 jgragam: connect feels like a subset of what new session does. A lot of the scenarios I'm thinking of are ones where you may not know the session id. For example, if I'm running some tests and I want to connect my VS.Code instance to running tests, I may know the process ID of the browser, but not the session id. 08:31:58 s/jgragam/jgraham/ 08:32:16 jgraham: I agree for a cloud provider, the opposite is true. 08:32:59 shs96c: in selenium /status gives you a list of the session ids running in the process, so if you have the port to connect to, you can find out the sessions ids 08:33:06 ack AutomatedTester 08:33:06 AutomatedTester, you wanted to react to AutomatedTester 08:33:57 AutomatedTester: Christian Bromann was advocating for a more async `new session` command, which fits in with the "warming up" idea. That's because it may take a long time to start a new browser. That might be something to look into. 08:34:30 ack sadym 08:34:51 sadym (IRC): to clarify, we have a webdriver server, and we want to support a few websocket connections to that server, and some of those connections should connect to the same browser instance, and some of those connections to different browsers 08:35:12 sadym (IRC): if I create a new websocket connection, i need some kind of ID, and that's the session id 08:37:14 jgraham: the answer is "maybe". In the case of a cloud provider, the session id unambiguously identifies the browser. If I'm running firefox locally, there isn't necessarily a server instance involved, but I have shared information that there is a firefox instance that was started with webdriver bidi, and if I connect to the local port. I can do that without knowing whether another program is running 08:37:15 q+ 08:37:44 jgraham: so I can start a test, start a network recording program, and then the port is the bit of shared information we need. 08:38:13 jgraham: in some cases the session id is enough. In other the PID or the port number is enough. If we connect via pipes, then the PID would be the thing you want to share around 08:38:45 sadym (IRC): for geckodriver, it only supports one instance of firefox. But in the more general case, you have a N:M connection. 08:39:36 shs96c: test runners typically run multiple tests locally 08:44:24 q+ 08:44:40 (discussion between shs96c and jgraham) 08:45:54 shs96c: what about a connect key to allow the use case of session connect 08:46:11 jgraham: for the non-cloud use case, that feels like overkill 08:46:36 shs96c: but there's no guarantee of a stable identifier that can be used locally 08:46:48 jgraham: that would be the URL, wouldn't it? 08:47:02 q+ 08:48:27 ack shs96c 08:48:28 q+ 08:48:31 q++ 08:48:56 qq+ gsnedders 08:49:11 ack orkon 08:49:19 q- + 08:49:19 orkon: it sounds like cloud providers should add a session id or similar to a websocket url 08:50:26 orkon: the websocket url is the identifier that can be used. Therefore it's fine to have just a `new session` command. Cloud providers know which sessions have started and can maintain a routing table based on url. 08:52:12 AutomatedTester: that's what the session id is trying to do. Users connect to a single URL, not to multiple ones. Session ID can be part of the URL (classic) or payload (bidi). One of the downsides with the CDP model is that we need to build out forwarding websockets that go through a hub for accounting purposes. Selenium makes that second connection. The suggestion of using the url puts a lot of complexity into the intermdiary nodes 08:52:38 ack Sam Sneddon [:gsnedders] 08:54:00 Sam Sneddon [:gsnedders]: when you're running locally, it's often the case that you can specify the port the session will listen on. That gives you an ID you can look up on at the point where you create it. As soon as you add in any other ID being required, you either need to continue being able to pass in the additional information, or you need to pay more attention when the session is established. 08:54:09 Sam Sneddon [:gsnedders]: let's not break the simple case locally 08:54:15 +1 on not breaking the simple case locally 08:55:06 q+ to mention that we're already returning the websocket URL in session.new 08:55:23 ack next 08:55:25 gsnedders, you wanted to react to shs96c 08:57:18 q+ 08:57:44 zakim close the queue 08:57:54 zakim, close the queue 08:57:54 ok, jgraham, the speaker queue is closed 08:59:42 shs96c: I believe that consistency is key, and something that we should be striving for. I also believe that the "local" case is not always local: many people run a selenium server (or similar) to connect to a webdriver session. As such, optimisations, such as keeping track of a URL can't be relied upon locally. Having new session return some unique identifier (either a session id or a connection key) is consistent, and is guaranteed to 08:59:42 work 08:59:45 ack whimboo 09:00:25 shs96c: adding in support for things like finding out PIDs locally adds complexity to local ends in a way that isn't beneficial in all cases, and serves to muddy the waters about what's going on. 09:02:22 whimboo: I would like to get started with a security concern about using a session id to connect to an existing session. With CDP, we have access to all the data from the session, no matter which client is connecting. I don't see a problem when this is running locally, but when remotely it may allow an attacker to hijack a session and exfiltrate data. So new connections should be sandboxed. In classic there's just one session. 09:02:38 q+ to respond to whimboo's security concern 09:02:59 whimboo: maybe sessions can prevent any other session from connecting, perhaps through a new capability 09:04:19 shs96c: I think we are relying on https requests. I think we can rely on the security of the connection. this leaves the sec issue could be that on the local data being taken out. If it is in the URL then it is can easily be done 09:04:38 ... if its in the payload then it will be handled through the https/wss 09:05:14 ... if we block other "connections" then it will limit the cloud providers from adding the value adds 09:05:50 shs96c: I think we're relying on connections being made through HTTPS without MitM attacks. We can rely on connection security. Then the problem is whether they key can be exfiltrated. If it's encoded int he URL it can. If it's in the payload it's just like security would be if running locally. The use case we're thinking of for being able to to connect is cloud providers being able to add extra facilities. They might also want to record a 09:05:50 video stream. Preventing any other session from connecting to a session would prevent that functionality. I don't think it's a problem unless we're worried about transport security being breached. Being able to lock a session would prevent cloud provides being able to add these things. 09:06:00 whimboo: we may need to check in firefox we don't have a secure one. HTTPS will be important 09:06:01 in chrome it is recommended to use pipes instead of ws 09:06:18 q? 09:06:38 ack jgraham 09:06:38 jgraham, you wanted to mention that we're already returning the websocket URL in session.new 09:06:39 s/HTTPS will be important/WSS will be important 09:07:44 jgraham: firefox at the moment only supports local connections, so I think unless we're worried about a process on the same machine as an attacker, I'm not really worried. Cloud providers would wrap the connection. Local attackers could also read pipe data 09:09:15 jgraham: in new session we return a url that allows one to connect to the session. We could also return a new url to create a new session. For firefox, that would be the url you connected to originally. For a cloud provider that would be something different to connect to an existing session. URL would be tied to an existing instance. Lacking the URL would indicate that only one session at a time is supported. 09:09:24 ack maksim 09:09:31 ack sadym 09:10:37 Zakim (IRC): currently, we have a websocket connection, which can be upgraded to a bidi session. That's the only way to connect to a server. From that perspective, the URL we need to connect to is the browser instance. It seems like, the websocket is a bit overloaded, and it doesn't seem the right place to connect a new session to. 09:11:07 Zakim (IRC): There is a thing that creates the browser that is out of bidi, and it seems natural to put this logic in the thing that starts the browser. 09:11:35 Zakim (IRC): the problem is that it would move capabilities out of `new session` in bidi, and it has to be set before the instance is running. 09:12:12 s/Zakim (IRC): currently, /sadym: currently, 09:12:31 s/Zakim (IRC): There /sadym: There / 09:12:44 * /sadym: currently, / 09:13:00 s/Zakim (IRC): the problem/sadym: the problem/ 09:32:31 zakim, open queue 09:32:31 ok, AutomatedTester, the speaker queue is open 09:37:43 shs96c: in summary: We are agreed that we want multiple sessions, we are agreed that are opaque to each other. In puppeteer it would be good to separate . I think that connect command is useful for cloud providers. We are in agreement that needs a unique identify it. THis can be in a URL. We return a ws url for clients to connect back. I propose we add `session.connect` that connects to the ws url that is in the 09:37:43 capabilities that have been returned when starting the browser. 09:38:48 jgraham: I think this is good but there are some things I disagree with that it would be good to continue the implementation detail in the issue 09:39:40 s//initialising the browser from connecting a session/ 09:40:22 topic: Sandbox mode 09:40:35 github: https://github.com/w3c/webdriver-bidi/issues/289 09:41:55 spec draft:... (full message at ) 09:42:18 q+ 09:42:30 shs96c: to summarize from a previous discussion is that we want a way to create a session isolation for automation and working across browsers. This would be something like containers 09:42:44 qq+ gsnedders 09:44:01 Sam Sneddon [:gsnedders]: in safari concept of profiles is not really exposed and can only be changed when the browser is started. Safari is a singleton like all MacOS applications 09:44:01 ... what safari can do is have many different private sessions 09:44:04 ... and we only provide ephemeral session for webdriver 09:44:30 shs96c: Is the proposed API going to be implementable? 09:44:40 ack Sam Sneddon [:gsnedders] 09:44:41 ack next 09:44:42 gsnedders, you wanted to react to sadym 09:44:49 proposed API: https://matrix.org/_matrix/media/v3/download/matrix.org/OskbYencEkxrfnjrRBJGMHRI 09:45:05 ack next 09:45:28 whimboo: I think that it should probably sit on the browser module rather than the browsing context module 09:45:41 and then would like fit the model already in CDP 09:46:01 q> 09:46:03 q? 09:46:03 +1 to this being the wrong place in the API to define this kind of thing. 09:47:08 RRSAgent: make logs public 09:47:10 RRSAgent: make minutes 09:47:11 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html jgraham 09:47:17 I don't mind defining it elsewhere, my thought process was that it is a container for browsing contexts, therefore, could be in the browsing context. In CDP, it is in the Target domain 09:47:41 q+ 09:47:47 ack next 09:48:40 orkon: the idea again is that we can achieve storage isolations 09:48:40 ... and then you wouldn't be aware of the other sessions that are ahppening 09:48:46 ... the first API would create a container that would do some implementation specific 09:48:56 ... and container is implementation specifici 09:49:22 ... and then you create a browsing context in the container 09:49:47 ... and then the next item is that you can close all containers when shutting down the container 09:51:11 s/ahppening/happening 09:51:38 q+ 09:51:43 RRSAgent: make minutes 09:51:44 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html AutomatedTester 09:51:55 ack next 09:52:02 q+ 09:52:53 sadym (IRC): this API aligns with API already being proposed in bidi 09:53:07 ack next 09:53:30 jgraham: I think this seems implementable in Firefox 09:53:36 s/with API/with realm sandox API 09:53:43 ... aligns well with how the containers API works in Firefox 09:53:57 q+ 09:54:11 ... it comes with some limitations around temporary storage but they are being worked on 09:54:23 re: the specific API, does browsingContext.GetTreeParameters need to contain the Container? does the browsingContext.BrowsingContext not already uniquely identify the browsing context across all containers? 09:55:15 gsnedders: it might be redundant. It looked like it was needed but perhaps we can remove that part. 09:55:34 ... my question re: webkit. If you have multiple automated ephemeral sessions does it map to this API where webdriver can see everything or does ever epheremeral session isolated 09:55:48 Sam Sneddon [:gsnedders]: I don't see any reason why it can't be implemented 09:56:01 orkon: For a list of top-level bc's we probably want to have it to exclude tabs not using this container 09:56:23 ... ultimated the UI process knows about everything and everything passes through it so it probvably doesnt matter 09:56:28 q? 09:56:50 Also, I'd suggest we use some terminology aligned with https://privacycg.github.io/storage-partitioning/ rather than "Container". But that's a bikeshed discussion. 09:57:05 jgraham: I think the thing we will need to do is go through the APIs and see if need to share information about the container so people can route back to that container 09:57:23 ... or commands take an argumnet that has the container ID 09:57:50 ... there is some implementation complexity but something worth doing 09:57:55 q? 09:58:06 ack next 09:58:24 shs96c: I think the requirement about how prodfile data is stored is a impl detail 09:58:42 In particular, it seems important that we can refer to all contexts in a container now or in the future for things like event subscriptions. 09:58:52 ... and I 2nd what Sam says about using https://privacycg.github.io/storage-partitioning/ 09:59:18 jgraham: is that what we want? 10:00:07 q+ 10:00:07 Sam Sneddon [:gsnedders]: yes I think so. There are some differences we need to be aware of and this CG document is still very early stages 10:00:07 ... but the terms in there are probably what we want to be using 10:00:54 ... we should check what the term ephmeral sessions means and make sure they match with everyone is doing 10:00:54 q? 10:00:54 ack next 10:01:10 orkon: I think using terminology from partition is good 10:01:20 q+ 10:01:43 ... I think that the grouping of this going to move things in the future so it could be more than storage partitioning 10:01:57 ... I am open to any suggestions on this moving forward 10:02:01 ack next 10:02:20 sadym (IRC): API wise this one of the options and it is quite meaningful 10:02:43 ... we could also put this on to session new as an argument 10:02:49 q+ 10:02:56 ack next 10:03:28 jgraham: I dont want us to overload new session here as well as we have already discussed about this earlier 10:03:34 ... this is a top level concept 10:03:54 I am with James on this 10:04:24 q+ 10:04:28 ... I perfer the API shown above as it is simpler to follow and use and is explicit 10:04:31 ack next 10:05:41 sadym (IRC): another question is around subscription to events. What happens to global events? Do we subscribe to the container from a global session 10:05:41 q+ 10:05:41 jgraham: this is why I suggested we review all APIs when doing this work 10:05:41 ack next 10:06:25 q+ 10:06:27 orkon: re: subscriptions I dont think we would to subscribe to the container and get those as you subscribe to the context and then events bubble from that 10:06:35 ... so we don't need to change anything 10:06:39 ack next 10:07:50 jgraham: It is not part of the MVP for this to be a feature. I am sure we can land this and review. We would need to update the wdspec tests and 10:08:15 q? 10:09:44 topic: Add support for examining/manipulating intercepted network response bodies 10:09:59 github: https://github.com/w3c/webdriver-bidi/issues/541 10:10:01 ScribeNick: orkon 10:11:26 jgraham: with the network request interception, we can change req body and headers but we don't allow intercept the actual network response body and edit it in place 10:11:37 jgraham: the reason is that the body can be very large 10:12:18 jgraham: sending large bodies in a json base 64 message is problematic 10:12:50 jgraham: this is a feature request that you could rewrite the body and we should support it 10:13:12 q+ 10:13:13 jgraham: so supporting it depends on the general facility on doing streamed IO of large payloads 10:13:48 jgraham: basically, it works in CDP: instead of returning text in one go, you return a handle that allows you to pull more data in chunks 10:14:29 jgraham: I think it is the most obvious design. For network req interception you also need a way to send the data from the client to the browser (the reverse) 10:14:47 jgraham: you might need a write steam in addition to the read stream 10:15:06 jgraham: and a way to fall back to the existing stream 10:15:26 jgraham: for network request interception it will be an opt in per request 10:15:42 jgraham: so you intercept the requests and tell that you will need a body later 10:16:29 jgraham: do we want to be declared upfront or a decision during the lifecycle? 10:16:41 q+ 10:17:43 ack next 10:18:48 https://github.com/googleapis/googleapis/blob/6598bda8b438cd39440f71bbe88915587ec79c05/google/bytestream/bytestream.proto 10:19:11 shs96c: just two things: we are going to be sending binary data back and forth. JSON is not ideal format for it. At some point we might consider an alternative format for the spec, perhaps, protobuf or some other encoding supporting binary data. Second: we want to read and write memory remotely, ByteStreams might be a good fit. 10:19:24 shs96c: perhaps we don't need to create new IO mechanism 10:19:50 ack next 10:20:54 Two things. Firstly, I would prefer to decide on a request by request basis. It's more consistent with how puppeteer works, and it allows us to be more flexible (eg. reacting to other data, or modifying data for every N requests) 10:21:48 orkon: Secondly, uploading the binary data after the request, we'll need to see what support we have in CDP. It only supports a base64 encoded body. Not sure if there's a precedent for file upload 10:21:58 s/Two things/orkon: Two things/ 10:22:12 ScribeNick: orkon 10:22:21 q? 10:22:28 q+ 10:22:46 q? 10:23:07 ack next 10:23:44 q? 10:24:45 @sadym: is the use case modifying the response body? 10:25:10 Jim Evans: the point of the issue is that I am as a user that I want to modify the entire body or its parts that gets returned in the response 10:25:30 Jim Evans: not only replacing the complete body or manipulating the parts of the body 10:26:09 sadym (IRC): we can currently fulfil the static body 10:26:13 jgraham: we already have it 10:26:25 shs96c: only if the response fits into memory, currently no streaming 10:26:36 q+ 10:26:42 ack next 10:27:55 shs96c: the first thing the list of URLs is optional, the second thing is if providing the complete response will be handled in the consistent way, e.g., to indicate if it is a final part of the body. Or we always send the IOHandle 10:28:12 q+ 10:28:28 shs96c: so we need a way to get the body from the response 10:28:52 shs96c: but when we do network provideResponse we replace the body with the IO handle 10:29:21 shs96c: I guess the IO handle for read will return ??? 10:29:45 shs96c: it will return network.Bytes 10:29:55 and if it is the end it will return eof 10:30:10 and write would take a network.Bytes value 10:30:41 shs96c: so we perhaps have a read handle and a write handle 10:31:02 jgraham: it makes sense to have separate handles 10:31:12 jgraham: next steps is to define the details 10:31:25 q- 10:32:06 Topic: Web Extensions testing 10:32:11 ScribeNick: shs96c 10:32:58 q+ 10:33:58 q+ 10:34:05 ack orkon 10:34:09 orkon: we support limited extension testing. For install and remove, for Chrome it is only done in capabilities. The Web Extensions group tell us this is difficult to change in chromium. 10:34:30 orkon: is there some cross-browser agreement we can have on how to install an extension 10:34:34 i don't see an issue. probably we can file one and then attach the log in there afterward 10:34:40 ack next 10:36:11 jgraham: the thing that happened earlier in the week, the web extensions CG's goal is to incorporate web extensions into WPT, where each test will be its own extension. The API they're looking for is `install extension` and `remove extension` without needing to restart the browser every time. They may want more (eg. activate and de-activate extensions), but the main thing is being able to install extensions at run time, 10:36:21 jgraham: this would be useful for Mozilla. 10:37:08 jgraham: I think there are use cases for things other than the extension just lasting the lifetime of the browser. 10:37:15 request for geckodriver and WebDriver classic: https://github.com/mozilla/geckodriver/issues/1476 10:38:00 orkon: was told that installing extensions at run time was "practically impossible" 10:38:19 q+ 10:38:28 ack next 10:38:45 shs96c: do we want to make this a problem for the web extension CG to solve using a webdriver bidi extension? 10:38:55 q+ 10:38:58 orkon: perhaps, yes 10:39:05 ack next 10:39:45 whimboo: in geckodriver we can install an extension at runtime. Can even do this in private browsing mode. 10:39:52 q+ 10:40:03 whimboo: the goal is to avoid changing the payload of the test per browser 10:41:15 whimboo: the most important short-term goal is to be able to install extensions at `new session` time by having a standardised capability containing the extensions we want to install. Both Firefox and Chromium have support for this. 10:41:44 jgraham: do we think ignoring the web extensions cg stuff, do we have use cases in firefox that require us to install and remove extensions at run time 10:41:47 q+ 10:41:53 whimboo: probably not 10:42:25 whimboo: I can imagine that extension authors might want to test the `install` and `unload` scripts are being correctly called 10:42:32 ack next 10:42:41 ack next 10:42:48 ScribeNick: orkon 10:43:28 shs96c: I remember from the Selenium project what SauceLabs has said: being able to install extensions at runtime is really useful because it allows having the browser ready to go and then users amend it with extensions at runtime 10:43:55 q+ 10:44:01 shs96c: it is debatable if the time is any different but looks like it's use case 10:44:06 ScribeNick: shs96c 10:44:09 I created an issue: https://github.com/w3c/webdriver-bidi/issues/548 10:44:13 ack next 10:45:00 whimboo: whenever people want to test extensions, enabling and disabling is useful. It would still be good to have extension installation at runtime 10:45:41 q? 10:47:14 jgraham: summarising. There seems to be a general appetite for a capability for installing extensions at start up time, and that's something we can standardise. Runtime seems more of a requirement of the Web Extensions CG. The CG cannot write web standards, so for practical reasons it might be easier for us to write the standard, but they could also specify a non-standard track document which specifies the whole thing 10:47:27 sgtm 10:47:41 shs96c: Is anyone opposed to us adding that capability ourselves? 10:48:07 Zakim (IRC): I've filed issue 548 for this 10:48:10 q+ 10:48:50 github: https://github.com/w3c/webdriver-bidi/pull/421 10:48:52 shs96c: shs96c: fyi it's sadym (IRC) 10:49:35 q? 10:49:39 ack next 10:49:40 s/Zakim (IRC): I've filed issue 548 for this/sadym (IRC): I've filed issue 548 for this 10:50:37 orkon: imagine an extension is there, and it has background pages and popups. Do we need to change anything in the spec to make this work? I'm not sure all the extension contexts are the same as the regular browser contexts. Does anyone see any blockers in the current spec for working with extension contexts? We may need some special types to differentiate them 10:51:16 q? 10:51:39 q+ 10:51:47 ack next 10:51:52 q+ 10:52:02 orkon: maybe this is some sort of bidi extension for dealing with web extensions. Not sure 10:52:04 ack next 10:52:33 jgraham: I think generally the stuff that's in extensions fits into the model, which is running scripts in specific realms. 10:53:42 jgraham: I'm not sure how close the models of brower and extensions contexts are. Chromium may be doing something different. My best guess is that supporting web extensions is a few more properties or enum options that this script is associated with a specific web extension. Maybe `context created` needs a webextension ID. Similarly for realms. 10:54:02 q+ 10:54:05 q+ 10:54:23 jgraham: It probably makes sense to include the Web Extension CG to make sure we understand the model correctly. The question I have is how much of a priority is this for you? 10:55:13 orkon: it's P3 for Puppeteer, P2 for webdriver, and P5 for Selenium. Depends on how much support is needed. We have subscription events, which allow you to subscribe to everything. Should this apply to extensions? 10:55:18 @jgrh 10:56:08 jgraham: is everything the same priority? The proposal has two separate parts. The capability model seems fairly high priority. For access to the extension, it seems to be lower priority 10:56:14 s/webdriver,/webdriver.io,/ 10:56:36 q? 10:56:41 ack next 10:57:25 whimboo: it's not only background pages. web extensions can also add chrome to the browser. When there's a button in the toolbar, there are popups that are opened, these may also be a browsing context 10:57:33 ack next 10:58:07 orkon: the thing with background pages is that in cdp there's a special kind of target, and that's supported in puppeteer (eg. service workers) 10:58:17 orkon: there is no way to automatically handle popups 10:58:32 orkon: how will we handle extension actions? Developers also want to test that. 10:58:53 orkon: the difficulty is that we don't have support for this in CDP or Firefox. It's not something that's already supported. 10:58:56 q? 10:59:48 orkon: the summary is that we need to explore more details, and figure out which changes we need to make to the spec. The feeling is that no-one is opposed to being able to access the extension context from bidi. 11:00:03 shs96c: and the feeling is that we should be able to install extensions from new session 11:00:06 q+ 11:00:11 ack next 11:01:23 q+ 11:01:46 Sam Sneddon [:gsnedders]: I think that our general concern about webdriver being able to interfere with local browser state (and extensions are installed at the browser level, so interact with the user's safari install) It remains the case that we don't want the user's state to be observable. We are probably better getting people from the Web Extension CG involved. There are questions around interacting with things that are a shared state 11:01:52 q+ 11:01:56 MaksimSadym has joined #webdriver 11:02:00 ack next 11:03:21 jgraham: particularly for installing extensions, it would make sense to have a spec that if you can't install an extension for "whatever reason" then you can fail, and if that's in `new session` it can fail the session creation. End users would have the option of "not doing that". Could easily have the spec not make extension installation a requirement 11:03:25 ack next 11:04:01 orkon: asking a clarifying question: does this position include installing at session start up, or just at runtime? 11:04:34 Sam Sneddon [:gsnedders]: Safari on macOS is a singleton. There's only one instance running. If Safari is already running, the session connects to that running instance. 11:04:47 q? 11:04:59 zakim close the queue 11:05:09 zakim, close the queue 11:05:40 ok, jgraham, the speaker queue is closed 11:13:05 rrsagent, make minutes 11:13:07 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html AutomatedTester 12:10:55 topic: Document id & routing commands by document 12:11:07 github: https://github.com/w3c/webdriver-bidi/issues/434 12:11:21 zakim, open the queue 12:11:21 ok, jgraham, the speaker queue is open 12:11:28 scribenick: automatedtester 12:17:00 jgraham: The proposal here is when we serialise a document that it has a unique document id that is different to the context/navigable 12:17:11 q+ 12:17:31 ... the reason for doing this that some commands that don't want to just send to context but at the document 12:18:18 ... the example is you want to run a script in a specific document in a context. If the document navigates then targetting the document means it won't run in the wrong place 12:19:08 ... from a spec point of view this is how generally things work through the process and having a document id is easier to target 12:19:28 ... and it removes the chance that what you think will happen might not happen 12:19:45 ... in the original issue in github there is the same request from web extensions 12:19:54 q? 12:19:57 ack next 12:20:29 present + 12:20:30 orkon: I was wondering if targeting realms would solve this since a realm is tied to the document lifetime 12:21:27 jgraham: you could specify the realm for execute script but in the case of locateNode and navigate you want it to be specific to that document 12:21:57 orkon: I was meaning that realm could be a sandbox and we target that 12:22:37 ... do we feel that it is still useful to target a context?] 12:22:42 q? 12:23:02 jgraham: I think this adds complkexity as it means there is more than 1 to do it 12:23:22 ... and we have to do something in the implmentation to route things to the right document and the error cases 12:23:40 ... and for subscribing to events we want it to the document 12:24:09 ... I think it we would need to probably support both of context and docuemnt 12:24:23 ... I think the high priority item is to have serialisable document 12:24:54 ... that then opens up the opportunity to do any other changes later 12:25:21 orkon: it is possible for a client to learn when things have executed in the wrong space so I think this could be good 12:25:23 q? 12:26:41 jgraham: so we have agreement that we will serialise the document id back and at a later stage update the other commands 12:30:12 Topic: Provide support for batching commands, either only for new session, or for the general case 12:30:30 github: https://github.com/w3c/webdriver-bidi/issues/447 12:30:36 q+ 12:30:50 ack next 12:31:12 qq+ orkon 12:31:39 jgraham: one of the goals for bidi is that it should work well with relatively high latency connections 12:31:42 q+ 12:32:19 ... one of the problems is that as we make more commands to the rprotcol the harder it becomes for high latency connections 12:32:50 ... so it makes sense to do batching 12:33:48 ... like we have in actions. There was a basic proposal for locateNode to batch up searches for elements 12:34:31 ... we could batch up things in the new session like "create session, insert these preload scripts and set something else up" 12:35:42 ... the use cases are very interesting but only work in certain contexts like new session, find element... 12:36:29 ... so do we want to build something that is generic and do we want to handle the case where is data flow between commands? 12:36:36 ack next 12:36:37 orkon, you wanted to react to orkon 12:37:23 orkon: I wanted to be mention that high latency for batching out commands in parallel 12:38:30 ... If then there are wanting things to be sequentially then it can have a aggregate so that we can do e.g. scroll into view then do an interaction 12:38:52 ... I wonder how many cases that would have dependecies between commands 12:38:57 q? 12:39:04 ack next 12:39:25 shs96c: not just latency but bandwidth is something we need to care about 12:39:37 ... a chatty protocol will slow things down too 12:39:49 ... a lot of this is not relevant for localhost 12:40:26 ... this is a problem when we introduce the internet and we can see about zipping up data 12:40:31 ... and batching be another 12:41:12 ... a number of people have looked to do this in the past 12:41:23 q+ 12:41:48 ... I dont think we need to worry about in the spec. I think we can see about putting a note in the spec saying this could be made more efficient so you can do it 12:42:05 q+ 12:42:11 ... I dont think we need to solve it but be cognizent. we dont want to be too chatty 12:42:17 ack next 12:42:45 jgraham: stuff like compression can be done transparently and i am not worried about it 12:43:46 ... for batching I am worried since we are already doing kinda batching I dont think we can't just do it 12:44:03 q+ 12:44:06 q+ 12:44:33 ... 12:45:09 ... and then there is the locateNode that goes from element to shadow to another node to ... 12:45:33 ... we are building batching in different ways and that might be the right way to do it but we could also see if this should be generic 12:45:39 q? 12:45:42 ack next 12:46:24 sadym (IRC): are talking about batching or setting dependencies on commands? 12:46:27 jgraham: yes 12:47:30 jgraham: if we are talking about commands that have sequence then we need to figure out a way to share data 12:48:03 shs96c: in locateNode there could be ways to do this to build out an AST how you want it to figure out the data across 12:49:12 sadym (IRC): if we want dependencies that we can do that. We might need to expose to it the realm and you do that 12:49:58 jgraham: we could have done this all in JavaScript but that is executing things 12:50:29 ... so people could execute the bidi commands from a javascript sent acorss the wire 12:50:38 q? 12:50:43 ack next 12:51:07 shs96c: I think sadym (IRC) covered my point 12:52:06 q? 12:52:15 ack next 12:52:53 orkon: I think if we batching of sequetial execution that it would be beneficial 12:53:21 ... I wonder if there are other specs that show how to describe workflows 12:53:27 ... but I don;t think we want to have that 12:53:50 ... it will then be very hard for intermediaries to be able to understand and execute across platforms 12:53:54 q? 12:55:20 jgraham: I think there is an example that allows you to describe a way to batch workflows 12:55:20 ... with intermediaries I think its better to not have a scruipting language that does this 12:55:53 ... they wouldnt be able to catpure and manipulate the payload 12:55:53 CapnProto time travel RPC: https://capnproto.org/rpc.html 12:56:13 s//CapnProto time travel RPC 12:57:41 jgraham: if people are excited by this it might be good for someone to create a prototype and then we can go from there. We dont fully understand all the tradeoffs 12:57:46 q+ 12:57:54 ack next 12:58:22 orkon: I think we have a proxy format that is like JS 12:58:30 ... it has hard to parse and compile 12:58:48 ... and it is probably too many steps to handle 12:58:57 q? 12:59:10 PAC (Proxy AutoConfiguration) 12:59:26 Jem has joined #webdriver 13:00:33 s/proxy format/PAC (Proxy AutoConfiguration) proxy format 13:02:14 topic: Emulation features - User agent override 13:02:17 github: https://github.com/w3c/webdriver-bidi/issues/448 13:02:46 q? 13:03:05 q+ 13:03:47 ack next 13:04:07 orkon: allows you to set to the custom UA and is related to client hints 13:04:28 ... in CDP you can do UA and client hints in 1 command? 13:04:32 q+ 13:04:52 q+ 13:04:52 q+ 13:05:05 ... client hints is allows you set up things that can affect the UA 13:05:13 https://wicg.github.io/ua-client-hints/ 13:05:35 q+ 13:07:10 q+ 13:08:59 AutomatedTester: I see little to no value in being able to change the UA for people. Users will assume that by making Chrome change their UA to be like firefox that it will act like firefox and there might actually be interoperable issues that then exposed where since we are making sure that things work cross browser they should be encouraged to use the relavant browser. E.g. pretending to be a mobile safari in chrome isnt going to 13:08:59 give the same result 13:09:07 ack next 13:09:14 ack next 13:09:54 Sam Sneddon [:gsnedders]: I was going to point out that Mozilla is apposed to UACH? and that Apple has some concerns 13:10:13 ... I think we should avoid doing things that builds on other specs that dont have cross browser buy in 13:10:21 ack next 13:11:24 jgraham: UA stance for Mozilla is negative so we can do this as a chrome specific extension 13:11:55 ... UA Client hints has some privacy concerns. This can be then covered in a chrome extension method 13:13:24 ... on the overall value in doing this is value for people testing their site where the version numbers for example 13:13:28 q+ 13:13:47 ... there are use cases internally for browser vendors 13:14:02 jugglinmike has joined #webdriver 13:14:52 ... in firefox people can set this in prefs but wont be in a specific tests 13:14:52 present+ jugglinmike 13:14:52 q? 13:14:52 ack next 13:15:25 q+ 13:15:26 shs96c: UA string makes sense but I am curious if this will be used in network interception 13:15:32 Request interception doesn't affect navigator.userAgent 13:15:43 s/in a chrome extension method/in a chrome extension method or defined in the UACH spec, slight preference towards the UACH spec because then others can implement it/ 13:16:06 q+ 13:16:42 ... I have a concern that if we allow this that we are going to encourage people to use a specific browser and wont have a positive impact on a interoperable web 13:16:47 q? 13:16:56 ack next 13:18:12 sadym (IRC): it is way more expensive to test on some devices and I don't think it will encourage people to use the wrong browser 13:19:07 shs96c: I think that having the UA set can be useful but pretending to be a different browser is bad 13:19:09 ack next 13:19:10 orkon 13:20:14 orkon: Let's drop CH as that is out of scope. UA changes can be good for browsers vendors but not for the average tester 13:20:25 ... what is webkits stance on changing this? 13:20:48 Sam Sneddon [:gsnedders]: I think this is fine. we already can do this its just exposing to webdriver 13:20:52 ack next 13:21:14 > Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 13:21:41 whimboo: I wanted to mention setting UA is hard to interpret 13:22:21 ... e.g. using this example it doesn't show what the browser is and can lead to false assumptions on the browser 13:22:21 ack next 13:23:23 ... if we take this into account that we give them presets that they can use 13:24:01 jgraham: I think there are use cases for this. The concerns raised are reasonable. I think its on clients to not overly expose this 13:25:25 ... if we have cases where can create the issues on a desktop instead of a mobile device then its fine but we shouldnt encourage people to use that as the final testing value 13:26:43 ... and to whimboo 's point we should give them something they can edit rather than make it all up and get it all wrong 13:26:46 q? 13:27:27 q+ 13:27:37 topic: Emulation features - Get the unmodified (original) user agent 13:28:03 github: https://github.com/w3c/webdriver-bidi/issues/446 13:29:05 q+ 13:29:06 orkon: this is related to the previous issue. It can be useful to get the UA when a session is started that we return it 13:29:13 ack next 13:29:22 ... are there some concerns about doing this? 13:29:26 ack next 13:29:40 q+ 13:30:25 shs96c: jgraham pointed out that on some urls that it changes the UA but having the default UA returned can be useful 13:30:25 ack next 13:30:26 q+ 13:30:51 jgraham: I think in general to have getters for any setters we have 13:31:18 ... so the case where the browser changes things under from you then we should return it if requested 13:31:47 ... for returning it in new session caps that makes sense 13:32:09 ... if there is a use for it i am happy to have it in the spec 13:32:12 ack next 13:33:06 Sam Sneddon [:gsnedders]: I wanted to point out there are cases where the UA string can change depending on the setting. e.g. on mobile requesting the desktop version of the browser 13:33:22 ... I broadly agree with jgraham that we should have getters for setters 13:33:36 s/desktop version of the browser/desktop version of the site/ 13:34:24 jgraham: I think we should return things that people could set or if the rbowser can change underneath them 13:34:41 ... I dont think its bad to return it in new session 13:34:49 q? 13:35:44 RRSAgent: make minutes 13:35:45 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html jgraham 13:35:53 topic: Emulation features - Support emulation of the device pixel ratio 13:36:08 github: https://github.com/w3c/webdriver-bidi/issues/529 13:36:29 q? 13:37:13 whimboo: this is simiar to viewport emulation 13:37:41 ... what we are missing the device pixel ratio so we are going to need a command to handle this 13:37:49 q+ 13:38:00 ... we can add it to be part of the viewport emulation being set 13:38:06 ack next 13:38:31 Sam Sneddon [:gsnedders]: if you are a headless browser then this make sense 13:38:33 q+ 13:38:51 ... if you are not headless then does it make sense that you can try set this higher than the screen 13:39:05 jgraham: no 13:39:44 ... and example of this in wpt in reftests to set it to 1 so that its the same across browsers 13:39:49 ack jgraham 13:39:57 makes sense to me too, including the unsupported operation 13:42:39 Also we might want to question whether we want to call it device-pixel-ratio (c.f. -webkit-device-pixel-ratio) or follow the standard resolution name? 13:43:29 topic: Webdriver BiDi Cookies 13:43:46 github: https://github.com/w3c/webdriver-bidi/issues/287 13:45:05 Lola: We are working on the cookies implementationm 13:45:16 ... we wanted some clarification on the design 13:45:27 https://github.com/w3c/webdriver-bidi/pull/501 13:45:41 ... I am not sure if people have reviewed jugglinmike (IRC) last comment in 501 13:46:01 ... the question is "Do we need storage.cookie since there is network.cookie? 13:46:18 q+ 13:46:23 ack next 13:46:25 q+ 13:47:00 shs96c: I think we should only have 1 thing for cookie. I dont know if it should be storage or network but I feel there should only be 1 13:47:12 ack next 13:48:27 q+ 13:48:36 jgraham: on the naming there should be one. There might be oberservable to clients. If they are observable to clients they same then it should be the same thing 13:48:44 q+ to point out correspondence to sandboxing discussion earlier 13:49:03 ... if you were to do things through network interaction that we should eb able to set cookies easily 13:49:13 ... with 1 simple way 13:49:31 q- 13:50:18 ... for context on cookies. browsers partition cookies according to the site that it has set it 13:50:52 ... browsers are now starting to allow a different way of setting cookies. So in firefox cookies are being partitioned from where they come. 13:50:52 ... and containers and private browsing can set these in different ways 13:51:24 ... we are not standardised on partitioned. 13:51:57 ... I've looked at Mike's draft that it tries to set what needs to be used and hints what the values could be 13:52:42 ... we could see about setting the values in the spec 13:52:55 ... and we can mention about setting the partition key 13:53:30 ... and we should leave it open for future development 13:53:30 q? 13:54:05 ... and I will stop talking. Dont hold me to it... or may be do 13:54:05 ack next 13:54:05 gsnedders, you wanted to point out correspondence to sandboxing discussion earlier 13:54:26 Sam Sneddon [:gsnedders]: I want to build on what jgraham said about sandboxing. 13:54:59 q+ 13:55:51 ... I don't think it makes sense to consider storage (or cookies) separate to the earlier sandboxing discussion. 13:55:55 q+ 13:56:29 ... We probably can't enumerate all the keys that every implementation might use to key their storage (and network, etc.) into different partitions, because that's something where implementations continue to try and innovate. 13:56:59 ... So we probably, to use the language of Infra, need a way to select a User Agent that exists within that Implementation. Which is exactly what the sandboxing discussion was about earlier. 13:57:38 ack next 13:58:25 jgraham: I think make sense for nameable partitions 13:58:27 ... I don't know how that works for cookies keyed on Source Origin 13:58:53 ... if we have partioned containers like 1 and 2 and they can be keyed to it 13:59:20 ... there are cases where example.org and example.net being stored differently in different browsers 13:59:42 ... and we cant enumerate things since it's unbounded implicit partitions 14:00:00 q+ 14:00:58 ... if 1st party cookies this can be easy but how each browser treats 3rd party cookies differently 14:01:06 ... and not being obvious to users 14:01:59 q? 14:02:49 ack next 14:03:55 jugglinmike (IRC): I wonder if there a presendence of storage. I wonder if there cookies on top of containers is it our job to explain how this works to users 14:04:33 .... 14:04:53 ... is there any concern on this from a standardisation point of view on how this interacts with the containers 14:04:58 ack next 14:05:16 q+ 14:05:43 shs96c: I think the real concern here that we will make something the average tester will have no idea how to use 14:06:00 ... they wont understand all the differences in these keys 14:06:45 ... I think that we create a situation where it confuses folks 14:07:06 ... I think we should go back to the use case of "I visit a site and then ask for cookies:" that it makes sense 14:07:26 ... so that we dont have users needing to know what browsers they are using 14:07:37 ack next 14:07:57 ... what is the bare minimum we can put in the spec 14:08:09 ... and then iterate 14:08:21 jgraham: I agree we should have reasonable defaults 14:08:35 ... for the cases we know we have reasonable defaults 14:08:55 q+ 14:09:02 .... once we have containers we will make sure that it makes sense for the user 14:10:22 ... for the origin paritioned cookies that we default to all be same 14:10:22 ... in the case for SSO this is likely where things "break" 14:10:22 ... e.g. auth.org is doing the auth for corp.com and people will want to set auth.org 14:11:56 shs96c: if we pregenerate the cookie and then allow people to set it 14:12:33 q+ 14:12:46 jgraham: we will try do the simple case well. There will also be cases wher ethey need to understand what they doing with cookies and partiions and they will do it 14:13:07 shs96c: can we do the bare minimum or should we do more 14:13:57 jgraham: 14:14:33 ... if we think that containers and SO make sense acorss all browsers then we could encode in the spec and if they cant do it just document it 14:14:58 ... e.g. you might be able to set it in Firefox and Safari and Chrome ignores it 14:15:47 shs96c: can we do this so we dont slam the door on iterating over this 14:15:59 jgraham: yes. we can have a key for container that could eb the session and then we have the source origin 14:16:17 s//if user really wants, they can set up network interception for the specific auth request and return set cookie. 14:16:57 ack next 14:17:28 orkon: I wanted to say that this capapbility based negotiation can allow us to build useful defaults 14:17:47 ... if we wanted to allow people to set source origin via a caps 14:18:17 ... I think this is a workable solution in the draft PR and what jgraham suggests 14:18:27 ... and some of the container stuff could be automatically computed 14:18:34 ack next 14:19:21 jugglinmike (IRC): to shs96c point on simplifying... would it work to have this part of the storage container? 14:19:33 ... or is this going to paint us into a corner? 14:19:44 q+ 14:19:53 ack next 14:21:26 jgraham: the organisation of modules is arbritary 14:21:56 ... as orkon said people want to set this near the beginning 14:22:18 ... it can be in browser... is it about controling the browser? I don't think it matters 14:22:28 q? 14:22:31 q? 14:22:31 q+ 14:22:38 ack next 14:23:02 orkon: we could maybe put containers into storage too? 14:24:26 ACTION: give feedback on the PR 14:24:33 s/have this part of the storage container/define this command on the browsingContext module/ 14:25:37 jgraham: the summary is we should try a model where we have 2 partion keys (container name from the containers discussion and source origin and both are optional) 14:29:26 I think the model is:... (full message at ) 14:57:31 rrsagent, make minutes 14:57:32 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html AutomatedTester 15:10:50 Topic: Enable calling Classic commands directly from Bidi 15:11:04 ScribeNick: orkon 15:11:18 github: https://github.com/w3c/webdriver-bidi/issues/546 15:11:24 shs96c: motivation: there are specs out there that we don't if they will be updated 15:11:40 shs96c: it will be useful to call those sections directly from webdriver bidi 15:11:50 q+ 15:12:06 shs96c: otherwise you won't be able to use some of the features 15:12:07 q+ to clarify the design proposal 15:12:23 ack next 15:12:48 sadym (IRC): do I understand it right it does not make sense to put it into the classic extension to bidi? 15:13:24 shs96c: but we want bidi to call into webdriver classic 15:13:31 ack next 15:13:32 jgraham, you wanted to clarify the design proposal 15:13:53 jgraham: I think it functionally does not make any difference where the spec goes 15:15:38 jgraham: just to clarify what you are thinking: let's take an example from the existing spec, something like getAllCookies. So the proposal would be to have a module in bidi to have a module called classic that will say with prose that it defines a command for each classic spec. 15:16:07 shs96c: no, the suggestion is to have the classic module with a single command that takes the parameter, the url template, and values of the parameters. 15:16:27 jgraham: so it will be modelling HTTP directly? 15:16:28 q+ 15:16:48 jgraham: so you send this command it will response with the command from the classic 15:17:11 Q+ 15:17:15 jgraham: it will be basically saying for each command re-implement the classic command 15:17:15 q+ 15:18:10 shs96c: I imagining that I will be connecting via chromedriver and geckodriver. So this module can use existing code paths. 15:18:58 jgraham: a reasonable question: if you have both http and bidi session, would it make sense to have that? 15:19:07 shs96c: not sure I have a good answer 15:19:34 jgraham: probably it is not so much more work to update the specs 15:20:00 shs96c: I just want to have no regression in capabilties 15:20:04 ack next 15:20:06 ack orkon 15:21:14 orkon: Not all BiDi implementations will have access to classic, and if they have access to classic it's not clear that it's much different to just use BiDi. 15:21:32 s/use BiDi/use classic/ 15:21:43 q? 15:22:13 jgraham: potential problem is that changing to async semantics would cause trouble 15:22:20 q? 15:22:28 ack next 15:23:40 sadym (IRC): my concern is that the assumption that not all bidi implementations have a way to invoke classic and that makes the proposal to not acheive its goal 15:23:52 q? 15:23:55 ack next 15:24:03 q+ 15:25:08 q+ 15:25:12 whimboo: that is something complicated especially in our case. But passing classic commands via bidi won't be possible for us. First, we have HTTP web driver and our protocol managers will not be compatible 15:25:22 whimboo: we will need to do a big rewrite 15:25:31 q+ 15:25:56 whimboo: if you need to send some http request from bidi because bidi runs in the browser and if we are testing on the mobile devices and we will need to issue http requests there. Not sure if it is easy enough. 15:26:21 whimboo: how much time would cause us to implement this compared to the converting and implementing specs 15:26:42 whimboo: so the number of missing APIs from classic is reducing step by step 15:26:59 q? 15:27:05 ack next 15:27:58 sadym (IRC): even though not all the servers have classic. ChromeDriver technically can do what you describe. We have two implementations ChromeDriver and mapper. In mapper it is not possible. But it can be in ChromeDriver. 15:27:59 q? 15:28:04 ack next 15:28:39 shs96c: I am going to suggest that we drop this idea and have an action to review existing standards that have webdriver extensions 15:28:51 ACTION: review existing standards that have webdriver extensions 15:29:31 q? 15:29:31 q- 15:30:13 ACTION: provide guidelines on how design BiDi extensions 15:31:01 Topic: How should WebDriver BiDi expose prerendering activation? 15:31:04 github: https://github.com/w3c/webdriver-bidi/issues/321 15:31:45 https://wicg.github.io/nav-speculation/prerendering.html 15:33:34 orkon: Prerendering is chrome-only feature not implemented by other browsers. Problem is that it will ship in Chrome and it affects how navigations happen in the browser. Changes the lifetime of the browsing context. There is a spec in WICG (see above). Main idea is that one tab can have two active browsing contexts. Link could destroy current context and active prerendered context. We could discuss if this is something we can accomodate in 15:33:34 BiDi e.g. allowing prerendering to have hooks into BiDi so they get predicatable results. Could pretend that prerendering doesn't happen at all, but it doesn't work well with e.g. network interception; should it intercept requests in prerender tab. Opinions on how this should work? 15:34:12 orkon: Also it's a topic that requires some backgorund reading, so maybe no solution today, but we should have it on our radar, since there might be other similar changes to the lifecycle. 15:35:18 q+ 15:35:20 Sam Sneddon [:gsnedders]: Some of the problems already exist with preloading, even without prerendering. There are already network requests you could intercept at the point that you're preloading. Other browsers do this, but I don't know if webdriver can trigger them. 15:35:50 q- 15:36:01 orkon: Currently changing the viewport is specific to context, but for prerendering it's technically a different viewport but you'd expect to get the same result. 15:38:00 q? 15:38:06 q+ 15:38:31 jgraham: it's hard to know if this violates any invariants that authors might depend on without examining the spec in detail. For example do we get load events without a navigation, or if we get a navigation for the preload do we get a second one for the actual user initiated navigation? 15:38:36 ack shs96c 15:39:36 q+ to ask questions about debugging 15:40:19 shs96c: I am opposed to magic. I would be tempted to say that the events should be fired as normal as if it was happening in a normal tab. Then we should have a different event to describe the navigable being activated. We expose the underlying internals. Might break some mental models but it's opt-in, so if you're enabling this you should be able to handle it. 15:40:41 q+ 15:41:32 jgraham: I'm worried about clients invariants being broken which users can't fix. 15:41:46 q+ answer about puppeteer 15:41:54 shs96c: Selenium doesn't really maintain state, but maybe other clients do 15:42:06 ack Sam Sneddon [:gsnedders] 15:42:13 ack next 15:42:13 q+ 15:42:14 gsnedders, you wanted to ask questions about debugging 15:42:45 Sam Sneddon [:gsnedders]: How does this interact with the ability to debug browsing contexts? Can you break on exception in preload navigables? 15:42:48 orkon: Yes 15:43:20 Sam Sneddon [:gsnedders]: SO you can debug these. Presumably at this point it gets shown somewhere. This seems like an argument we should pass the events through to the client. 15:43:22 q+ 15:43:24 ack next 15:44:00 sadym (IRC): To clarify the proposal we should add a new type of browsing context and add a new event when one is replaced with another. 15:44:09 shs96c: That seems like a reasonable model 15:44:47 ack orkon 15:45:27 q+ 15:45:42 q+ 15:45:58 orkon: For puppeteer having some context on the events. Question is about state e.g. enabling interception for a specific top level context it won't be enabled for the background context, so you'll lose events until it's intercepted. So you need to subscribe to everything. 15:46:11 shs96c: Like an inheritable thread local in java 15:46:30 q- 15:46:33 shs96c: Events could flow through to associated contexts 15:46:55 ack jgraham 15:48:48 jgraham: the spec will be informed by what you can do in CDP. Agree that events should flow through to clients. If this breaks clients, then that's unfortunate. There will need to be flags on these events to let people know that the events are happening on pre-rendered content, and there will need to be a new event that a navigable will switch 15:49:49 jgraham: the existing model is limited. For example, if a context forms an associated browsing context, then that would inherit the event subscriptions from the parent context, but that's not how the spec works at the moment. The spec expects global or specific subscription to events. May need to consider inheriting subscriptions, or more flexible models 15:50:26 ack sadym (IRC) 15:50:32 ack next 15:50:51 q+ 15:53:13 Having the current mechanism already supports inheriting, if we consider the pre-rendered context a special kind of child of the main one, all the events subscriptions will be automatically provided, but the client will be able to filter them out by the browsingContextId, which is provided for all the events (the latest should be double checked). 15:53:15 ack orkon 15:53:47 q+ to respond about inheriting subscriptions 15:54:29 orkon: What worries me a bit is that we could inherit events, but that would technically not be spec complaint because we route commands and events to and from specific top level browsing contexts, and the preload model gives up multiple top level browsing contexts. 15:54:41 ack shs96c 15:54:41 shs96c, you wanted to respond about inheriting subscriptions 15:54:42 ack next 15:55:52 shs96c: James was right. 15:55:52 We might need to model certain things in the spec as inheriting event subscriptions. I think it would also allow nice functionality. e.g. as a tester I set up request rewriting. The page opens an iframe. I want to automatically inherit the request interception for that iframe. 15:56:26 jgraham: window.open is a better example 15:56:34 orkon: Or service workers 15:57:54 Topic: Perform Actions: "scroll" action incompatible with pointer origin type 15:58:17 github: https://github.com/w3c/webdriver/issues/1758 15:59:06 scribenick shs96c 15:59:12 scribenick: shs96c 16:00:01 jgraham: the spec has a bug that claims you can use the wheel input source at a coord relative to the pointer, but the wheel input source does not have a pointer, and you can scroll on a specific element or at a specific point, but the scroll wheel itself doesn't have a current position. 16:00:42 jgraham: this is unlike an actual mouse with a scroll wheel, where the scroll happens at the current point position. We merge the PR that says if you have a scroll input type, you can't accept `pointer` as the origin for that action. 16:01:19 jgraham: So that raises the question of why `scroll` isn't an action on a `pointer`? Is it worth making `scroll` an action on a `pointer` type or not? 16:01:23 q+ 16:01:33 ack next 16:01:44 shs96c: I think it probably is 16:03:00 Topic: Support for "Is Element visible" 16:03:26 github: https://github.com/w3c/webdriver-bidi/issues/530 16:03:34 q+ 16:04:12 q- 16:04:54 ScribeNick: orkon 16:06:33 q+ for even more entertaining things people want to do with visibility 16:06:36 jgraham: test authors want to figure out if the element is possible to see if my app is working 16:06:52 jgraham: the most obvious thing is to check the bounding client rect is on screen 16:07:22 jgraham: and then turns out the visible means white one white, transforms etc 16:07:47 bromann 16:07:49 jgraham: we discussed it in Classic endlessly but ended up putting the code into the appendix based on Selenium 16:08:11 jgraham: so the question to what extend we want to revisit this to bidi? 16:08:13 q+ 16:08:47 jgraham: we know have preload scripts and not it is easy to send the scripts to the page and we wanted to update the javascript sometimes 16:09:03 jgraham: we have seen regressions when we updated Atoms 16:10:03 jgraham: there are possibilities 1) we do nothing, i.e., use the preload script to detect that whenever you want 2) we spec the same set of scripts 3) revisit the whole thing 16:10:18 jgraham: 3) (smth not based on the script) 16:10:20 ack next 16:10:21 shs96c, you wanted to discuss even more entertaining things people want to do with visibility 16:11:14 shs96c: there was one thing you missed. In WD Classic we use the visibility atom to check if the text is displayed because there was no innerText. It is still more consistent in many cases. 16:11:39 shs96c: I think a lot of ability to check if the element is visible might be only in the render tree 16:11:54 shs96c: I am not sure we will be able to define it well in w3c spec 16:12:10 q+ 16:12:14 shs96c: my option would be to go with option 1 16:12:17 ack next 16:12:24 q+ 16:13:44 orkon: just wanted to mention that option 1 sounds good (laughs) but if we want a solution, we should break the definition of "visible" into different parts. In puppeteer, visibility checks are used for figuring out if an element can receive actions (eg. is clickable) Maybe we could split out that part (eg. "what makes an element clickable") 16:13:46 q+ 16:14:10 q- 16:14:20 orkon: we don't need to cover all aspects, but we can figure out which assertions are relevant. We could probably do hit testing on specific clickable points 16:14:33 ScribeNick: orkon 16:14:35 q? 16:14:41 ack next 16:14:59 RRSAgent: make minutes 16:15:00 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html jgraham 16:15:06 sadym (IRC): +1 what alex said. How can preload script be used for visibility? 16:15:24 shs96c: you put the script to check to the global object 16:15:31 q? 16:15:34 ack next 16:16:14 shs96c: so I think hit testing is sufficient for interactions, but you might get weird results for some elements 16:16:43 shs96c: if you have a web component, how do you figure out what is interactable 16:16:51 q+ 16:16:54 ack next 16:17:03 jgraham: yes, I agree with all of that 16:17:38 jgraham: I think we should try to do nothing in terms of visibility and having smth in the API that directly exposes the pointer interactions APIs, and it makes sense to expose that 16:17:43 q? 16:17:55 q? 16:29:24 RRSAgent: make minutes 16:29:26 I have made the request to generate https://www.w3.org/2023/09/15-webdriver-minutes.html whimboo 18:38:19 Zakim has left #webdriver