15:46:48 RRSAgent has joined #webdriver 15:46:48 logging to https://www.w3.org/2022/09/16-webdriver-irc 15:47:05 Meeting: TPAC 2022 - BTT WG - Day 2 15:47:19 Chair: David Burns 15:47:28 scribe: David Burns 15:47:37 scribeNick: AutomatedTester 15:48:10 Agenda: https://www.w3.org/wiki/WebDriver/TPAC-2022 15:48:24 present+ 15:48:48 rrsagent: make logs world-visible 15:48:58 rrsagent: make minutes 15:48:58 I have made the request to generate https://www.w3.org/2022/09/16-webdriver-minutes.html AutomatedTester 15:53:15 MichaelMintz has joined #webdriver 15:53:38 present+ 15:55:10 present+ 15:56:04 Orca is the zoom room I should be in, right? 15:59:30 present+ 15:59:40 present+ 16:02:43 zcorpan has joined #webdriver 16:02:56 RRSAgent: make minutes 16:02:56 I have made the request to generate https://www.w3.org/2022/09/16-webdriver-minutes.html jgraham 16:04:26 present+ 16:04:57 present+ 16:07:17 DevinRousso has joined #webdriver 16:07:33 present+ 16:08:05 topic: Network logging 16:08:07 git 16:08:08 PeterRushforth has joined #webdriver 16:08:19 github: https://github.com/w3c/webdriver-bidi/pull/204 16:08:31 present+ 16:09:19 jgraham (IRC): we have a PR up for introducing a network module that gives you a series of events to get netwrok activity 16:09:32 ... it's limited to HTTP like connections only 16:09:41 ... the use cases we are targeting are 16:09:53 ... check whether a specific resource was requested 16:10:08 ... and generating HAR files for perf monitoring 16:10:29 ... we have discussed this in previous meetings which has shaped this 16:10:55 ... we have added 1 set of events unlike the way CDP handles this 16:11:19 ... and if we get a redirect we would add a flag to show that 16:11:44 ... the API and how it works is still to be written 16:12:19 ... and at this point what i would like to do is make sure that we don't have issues with the initial design before we start on the fetch integration 16:12:36 ... otherwise it will be a lot of work to go back and redo it 16:12:37 q? 16:13:39 Devin Rousso: i like that this is simpler, it's nice 16:14:20 automatedtester: Where is this in your priority list? 16:14:33 prushforth has joined #webdriver 16:14:37 jgraham (IRC): this is pretty high in my list. 16:14:55 ... we would liek to start prototyping this 16:15:40 q+ 16:15:47 ... from our point it is not blocked on the fetch work that needs to happen but it would be good to get agreement on the api etc 16:16:01 ack next 16:16:42 sadym (IRC): how would the interception of redirects work since there is only 1 event/ 16:17:15 jgraham (IRC): for logging we discussed in a previous group meeting 16:17:27 ... the rough concensus then was to have 1 event and flags on it 16:17:42 ... instead of events for all of the redirect chain 16:18:07 ... assuming we are happy with that design 16:18:39 ... [describes fields that could be added to the event] 16:19:08 Devin Rousso: would the request ID be maintained the whole time? 16:19:16 jgraham (IRC): I hadn't thought about that 16:19:42 Devin Rousso: [describes how it works in web inspector] 16:20:48 Devin Rousso: so as long as we use the same request iD for the network journey. For redirects we want to have the same ID or have a field saying it's a redirect 16:20:57 ... i prefer the former but can make either work 16:21:04 q? 16:22:00 jgraham (IRC): if you look through the current PR. there are TODO items in there that need answers. We can discuss 16:22:35 @foolip is about to review the PR 16:22:47 ... or people could answer on the PR 16:22:55 Devin Rousso: generally speaking we like this 16:23:51 topic: Cookies 16:24:29 jgraham (IRC): This is something that doesn't have an open issue 16:24:45 https://github.com/w3c/webdriver-bidi/issues/287 16:24:48 github: https://github.com/w3c/webdriver-bidi/issues/287 16:25:21 the high level item for this topic is that we need ot have something here like webdriver classic 16:25:41 ... I assume that people want this 16:26:48 ... how do we want this to work? 16:27:33 ... and then we have partitioned cookies do we want the API to return everything or just for the part of the partition? 16:27:54 Devin Rousso: in web inspector we have both 16:28:35 ... in CDP network domain returns a list of cookies that could have been sent, including ones that could have been blocked 16:29:05 ... e.g 3rd party cookies blocked by policy 16:29:37 Devin Rousso: I think we should go for the simpler option here as all cookies seems heavy handed 16:29:45 q? 16:29:49 q+ 16:30:20 q+ 16:31:03 q+ 16:31:33 AutomatedTester: One of the things that comes up when dealing with cookies is the ability to set before you navigate to a page. IN WebDriver classic you can only set for the current page. It would be good to have the ability to interact directly with the cookie store without requiring a navigation. 16:31:34 ack next 16:31:46 ack next 16:32:17 Brandon Walderman: we're debating whether to show all cookies on a page or to a domain? 16:32:48 ... if we're talking about adding a cookie domain that could straight to the cookie jar and doesn't need a network reques? 16:33:18 jgraham (IRC): I think like AutomatedTester_ (IRC) said, we want an aPi that allows us to interact with the cookie jar 16:34:06 ... the comment about network request was more 'do we want to emulate CDP'? or do our own? i can't see use cases yet? 16:34:33 Brandon Walderman: a web dev might want to test their site with different level s of tracking being blocked during testing 16:34:45 q? 16:34:48 ack next 16:36:05 Devin Rousso: as far your point AutomatedTester_ (IRC) I thinkj this will be handled by network interception 16:36:09 q+ 16:37:09 ... a user could set this while setting up the network interception and they would set the cookie and away they go 16:37:23 ack next 16:38:13 jgraham (IRC): in interception there a way to handle that and we should and I think that we should also add a cookie API. Interception could be overkill for some usecases 16:38:16 q+ 16:38:26 karlcow has joined #webdriver 16:38:49 ... I think that this isn't provin to be uncontroversial 16:39:04 ... we can discuss more in the PR 16:39:08 ack next 16:39:50 q+ 16:40:06 Jim Evans: it feels like the design goal of being able to implement classic on top of bidi not having an API that directly accessing it 16:40:15 ack next 16:40:52 Devin Rousso: my comment on network interception is that was purely for AutomatedTester_ (IRC) 's example but I do think that we need an API for interaction with the cookie jar 16:42:11 topic: Should `BrowsingContext.create` wait for the initial page to be loaded? 16:42:22 github: https://github.com/web-platform-tests/wpt/issues/35846 16:43:14 sadym (IRC): the question was raised in the wpt test that faced during the test 16:43:44 ... we weren't sure if the initial events for the navigation to about:blank would be handled 16:43:47 q+ 16:44:44 ... guarantee that we don't raise any events until browsingContext create is completed 16:45:34 Guarantee no initial navigation-related events are raised AFTER the browsingContext.create command is done. 16:45:52 s/guarantee that we don't raise any events until browsingContext create is completed/Guarantee no initial navigation-related events are raised AFTER the browsingContext.create command is done. 16:45:58 ack next 16:46:15 jgraham (IRC): i think what we want to guarantee for users 16:46:37 ... is that we want the first event needs to be browsingContext.create event 16:46:45 ... and not the load events 16:47:07 ... the open question is do you then get a load event for the about;blank page/ 16:47:44 ... and I know there there are changes in gecko to align with chromium/webkit 16:48:01 ... for the sake of wpt this should be enoug 16:48:12 ... and the clients it makes their lives easier 16:48:49 sadym (IRC): what you said is slightly orthogonal to what I am mentioning 16:49:23 ... browsercontext load and [other event] are done after create 16:49:34 jgraham (IRC): are you suggesting we don't send them/ 16:49:41 sadym (IRC): yes, 16:50:05 jgraham (IRC): is this more with how the command returns to the user/ 16:50:09 sadym (IRC): yes 16:50:18 AutomatedTester: I'm trying my best. 16:51:09 jgraham (IRC): if i create a new context and doesn't navigate you should get a create event but not a load event for about;blank 16:51:24 ... what about a navigation given/ 16:51:33 sadym (IRC): we don't allow the navigation/ 16:51:44 jgraham (IRC): so is this just the ordering/ 16:51:47 sadym (IRC): yes 16:52:27 sadym (IRC): [explains 16:52:41 ... how it works another use case] 16:53:08 jgraham (IRC): I am not confident how this would work with about:blank 16:53:17 ... and I don't know how this should work 16:53:44 ... for making the tests work why don't we just make sure the context created event 16:54:02 ... or do we need to have all the events/ 16:54:38 sadym (IRC): in the test we can rely that there are no events after the create 16:54:50 ... what happens before could be implementation specific 16:55:18 jgraham (IRC): i think that sounds fine to me... especially since about;blank is special 16:55:26 q? 16:55:37 _initial_ about:blank is special 16:56:27 topic: Network request interception 16:56:39 github: https://github.com/w3c/webdriver-bidi/issues/66 16:58:16 jgraham (IRC): This is a more speculative item 16:58:40 ... and I want to start work on the design so we can get it a little done over the next year 16:58:57 ... we have talked about network logging to get some info 16:59:13 ... but sometimes people want to intercept, modify and carry that on 16:59:46 ... people want to intercept a request and send back a mocked response 16:59:59 ... so I think this is a feature we should have 17:00:11 q+ 17:00:53 ... so one thing here is that network interception can put a lot of pressure on the client to handle each 17:01:24 q+ 17:01:30 ... and since some people test this locally and that's fine but we do have selenium users have this over the internet 17:02:10 ... the proposal is there is an event for browsing context/realms and with some form of filter 17:02:23 ... we have network events 17:02:50 ... do we want separate events or use the logging and then return 17:03:34 q? 17:05:05 AutomatedTester: My experience is that people using this feature in Selenium are confused about how this should/will work. For e2e testing this can be complex compared to lower level testing. Need to make it easier to use. 17:05:53 ... To the point about this being deployed over the internet, we can be talking about hundreds of requests that need to be intercepted. So prefiltering of events is a requirement. 17:06:24 q+ 17:06:30 ... I'm concerned that this could cause a problematic number of events for Selenium in the cloud providers 17:06:37 ack next 17:06:48 ack next 17:07:18 sadym (IRC): first question is add some kind of binding to the realm 17:07:46 ... and try have this done in the browser and then return 17:08:15 https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-RequestPattern 17:08:21 ... and then AutomatedTester_ (IRC) do you think that URL, resource type and interception stage is enough/ 17:10:23 AutomatedTester: Yes, that seems fine. To the point about doing this on the remote end, if we can figure it out I'd prefer that kind of solution. Pushing everything onto the client is a problem if things are running in parallel; can end up with a huge number of simultaneous requests. Server side interception would fix that. But the filters are a good start. 17:10:32 ack next 17:11:17 Devin Rousso: within web inspector we have filters and it can even be at filtering on request/response 17:11:35 ... webinspector doesnt have the resouirce type filtering 17:11:50 sadym (IRC): it's useful for changing cats to dogs on a page 17:12:36 jgraham (IRC): I can see resource filtering for all images then go for there 17:13:10 Devin Rousso: in web inspector we only allow filtering on EITHER request or response... 17:13:40 ... our reason is if you control one or the other then it's easier 17:14:08 ... we still send out the requests in case the server requires it 17:14:26 q? 17:14:29 ... it saves us trouble 17:15:04 jgraham (IRC): web extensions has a similar aPI here 17:15:33 ... does your api have overlap with web extensions 17:15:49 Devin Rousso: there is some but I don't know if they have full overlap 17:16:13 ... I don't have much knowledge of manifest v3 17:18:02 Luka: in chrome they have deprecated the interception API 17:18:30 jgraham (IRC): the stream API gives us what we need and we can manipulate it 17:18:53 luka: [mentions how this works with streams] 17:19:48 jgraham (IRC): [describes how things work in CDP] 17:20:59 ... the main question is Do we start with how CDP works or how sadym (IRC) suggested that it happens in a sandbox specific way 17:21:38 ... and I have a concern about how we this might work as we haven't got the primatives to make it work 17:22:05 ... and we want to make sure we support clients that already here 17:22:43 ... and it would be good to make sure we check how other groups are using it and then see if we can support them 17:23:09 q+ 17:23:55 q+ 17:24:30 AutomatedTester_ (IRC): I would vote for sadym (IRC) 's idea of putting this more onto the server 17:24:31 q- 17:24:57 ack next 17:25:32 sadym (IRC): i want to point out that it adds complexity to the server 17:25:44 ... so it's harder to implement and spec out 17:26:01 `getResponseBody` is used in Puppeteer/Playwright but `takeResponseBodyAsStream` is not. 17:26:55 q+ 17:27:53 karlcow has joined #webdriver 17:28:03 q+ 17:28:26 automatedtester: My preference would be to add more complexity to this working group so that people can use this feature in a meaningful way rather than simplifying things for the sake of the spec and putting a lot of pressure on client authors and users and then no one uses the feature 17:28:40 ack next 17:29:21 jgraham (IRC): I am not convinced for clients that injecting Js would be easier for them 17:29:44 ... there are perf reasons for injecting it all 17:30:36 ... so for the first iteration that we all people to replace the responses but not modify on the fly 17:30:40 q? 17:30:44 ack next 17:30:45 s/all/allow/ 17:31:20 Brandon Walderman: I do see the value of pushing things on to the server side for perf and ease of client creation 17:31:45 ... but I am hearing that there is concern of doing it in a sandbox 17:32:22 ... I wonder if there is a middle ground here where we can do some form of [explains data structures] 17:32:37 ... that way we can block things easily 17:32:56 ... and if you want more advanced cases then we can do more CDP 17:33:07 q+ 17:33:14 ... and we can add the sandbox solution in the future 17:33:21 ack next 17:33:21 q+ 17:34:22 jgraham (IRC): I think it will add more work 17:35:05 q- 17:35:15 +1 to what James said 17:35:28 +1 17:35:28 ... we can add a more declaritive later 17:35:50 ... and that way we don't need to have a more complex JS execution 17:36:19 ... it would be good to get a set of data from cloud providers here 17:36:45 ... but build the low level APi and we can build a higher level API later 17:36:55 q? 17:55:27 karlcow has joined #webdriver 18:05:00 karlcow has joined #webdriver 18:05:20 topic: Bootstrap scripts 18:05:46 Github: https://github.com/w3c/webdriver-bidi/issues/65 18:06:52 jgraham (IRC): The concept here is we have a method that allows a script to be injected and run before a page is loaded 18:07:26 ... the use case is we can define functionality that will be guaranteed when we access the page 18:07:44 ... and we don't need to worry about racing with loading 18:07:55 ... my reason for adding this to the agenda 18:08:32 ... in berlin there was a talk about priorities 18:08:33 q+ 18:08:42 ... and seeing that it is in a number of clients 18:08:50 ... so my questions are 18:08:58 ... what is the priority of this work? 18:09:08 ... and what is the MVP to make this feature useful 18:09:31 ack next 18:10:02 Devin Rousso: one of the reasons I suggested this in 2019 is that itenables us to do things without having to creating new events 18:10:22 ... it gives us access to the events and apis that are there 18:10:58 ... I think that this important but it's behind the networking interception 18:11:10 q+ 18:11:11 ... it's important and we should do it 18:11:44 q? 18:11:51 ack next 18:11:56 AutomatedTester: i think it'd be more accurate to say they're both kinda equal in my mind? 18:12:18 sadym (IRC): it's high priority as it's required in puppeteer 18:12:57 ... it was raised in berlin that it was going to be used by selenium to do things with the DOM 18:13:04 ... so it's a high priority 18:13:09 q? 18:13:10 is was mutationObserver 18:13:20 ^ yeah that's one use case I see for it 18:13:23 a big one 18:13:48 jgraham (IRC): there is agreement that clients want it and it has a reasonable priority 18:13:59 ... so the next thing is how do we get there? 18:14:20 ... so the proposal is fairly complicated because it has a lot of filtering 18:14:38 https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnNewDocument 18:14:42 ... but cDP just wants us to run things 18:14:58 +1 to having it be just "here's a script to run, i'll figure out what to do in JS myself" 18:15:13 https://github.com/w3c/webdriver-bidi/issues/157 18:15:24 ... one of the things here is that the JS might want to communicate back the client 18:15:39 ... and we have punted on that so we might need to solve that first before coming back to this 18:16:33 ... looking at this issue the main issue is how do you configure this since its before the page is loaded 18:17:16 ... [describes how this runs in a function] 18:18:09 q? 18:20:40 q+ 18:20:50 q+ 18:21:11 ack next 18:21:27 q+ > it should still be a platform object 18:22:00 q+ 18:22:04 Devin Rousso: I think the webdriver side to comms this looks fine 18:22:43 ... there is a extension scopes in webkit that allows us to be able do some extensions when running 18:23:18 ... and I am not against having this have be a function 18:23:48 ... mesage port seems fine but we don't need everything on it 18:24:19 ... and it would be good to describe the data that is sent back 18:24:42 ... [describes a use case] 18:24:56 q? 18:25:00 ack next 18:25:31 jgraham (IRC): treating this a stack, when serialsing we wont be doing anything special in this context 18:25:39 AutomatedTester: e.g. sending a DOM node back to the driver, which would do some sort of conversion to some format that the driver can handle (ideally the same primitives used elsewhere in WebDriver) 18:25:59 ... so javascript objects are serialised back 18:26:10 ... to discuss the previous design spaces 18:26:31 ... in cDp there is an add binding method that allows it to be available globally 18:26:45 q+ 18:26:46 ... there are 2 other options 18:27:13 ... we might want to message from a non-bootstrapped script to others 18:27:42 ... the other option is we have special value the client sends to handle this like a message port but not quite a message port 18:28:13 ... it puts the client in charge here as they can create the port and tells the browser 18:28:57 ...an advantage of separate ports is that it becomes implicit in the protocol 18:29:06 q? 18:29:10 ack next 18:30:13 sadym (IRC): it will be a little complicated to implement it in chromium 18:30:24 ... it exposes things globally but not to all realms 18:30:40 ... there is not concept of a binding argument 18:30:49 q? 18:32:09 jgraham (IRC): my understand of CDP is that you can do add binding because you don't know what the realm id will be for the boostrap script 18:32:46 ... so you can sandbox the bootstrap script and that limits to where it canrun 18:32:52 sadym (IRC): that is true 18:33:20 ... when you bootstrap you can describe how the script will be called in the sandbox 18:33:23 q? 18:33:28 ack next 18:34:03 Devin Rousso: in webkit I think we do it when the realm is created 18:34:37 ... and I am not sure we can filter as there are things we don't want to expose everything to the client 18:36:26 ... I think it would be better to basic and primative and let the driver do it but if we want to do something more complex that is fine too. It's managing state there... 18:36:50 ... isolatedvs in the page... we can do that later 18:37:06 ... in either scenario we can do it as scope extension 18:37:12 q+ 18:37:31 ... and we can give them the building blocks to do the right thing for them 18:38:00 ... in the scenario where the driver provides the script to say run this everywhere... 18:38:15 ... I can see there be an event when the bootstrap script is created 18:38:46 ... and get people to listen 18:38:57 ... i can see both ways working 18:39:10 q? 18:39:14 ack next 18:39:48 jgraham (IRC):I am hearing we want this feature and we want the scripts to run in a sandbox... or not 18:40:06 ... and there is a need for some form of messaging coming out of those scripts 18:40:21 ... that seems reasonable to me 18:40:38 ... I don't know how easy it will be to implement it 18:41:07 ... in the sandbox case it will be the most useful 18:41:40 Devin Rousso: I think the non-sandboxed version being the most useful 18:41:51 ... I think we will need both 18:45:05 q? 18:54:07 could you please repeat the proposed dates? 18:54:51 i believe it was 11/28-12/02 18:54:51 rrsagent: Make minutes 18:54:51 I have made the request to generate https://www.w3.org/2022/09/16-webdriver-minutes.html AutomatedTester 18:55:34 zakim: bye 18:55:51 rrsagent: bye 18:55:51 I see no action items