# Pastebin 7T43SvXG [2016-07-14 13:25:24] ⇐ JohnJansen quit (~JohnJansen@public.cloak): Ping timeout: 180 seconds [2016-07-14 13:34:26] Scribe: jimevans [2016-07-14 13:34:42] Topic: Element Retrieval [2016-07-14 13:34:42] — lukeis jimevans (haha) [2016-07-14 13:34:59] JohnJansen: why was by.id removed? [2016-07-14 13:35:28] AutomatedTester: it was decided at a previous f2f that query selectors could suffice and local ends could delegate [2016-07-14 13:36:00] AutomatedTester: client language bindings still have id, name, etc., but those are executed using CSS selectors [2016-07-14 13:36:36] AutomatedTester: querySelector and querySelectorAll are optimized by browsers due to their frequent use. [2016-07-14 13:37:44] AutomatedTester: Email to working group list asked why ID, name, etc. were removed because querySelector exhibit performance lags relative to ID, name, etc. [2016-07-14 13:38:59] AutomatedTester: One reason is that querySelector and querySelectorAll must walk the DOM and populate their return values before use, while e.g. getElementsByName is lazily evaluated. [2016-07-14 13:39:32] jgraham: Subsequent executions do not suffer the perf degradation [2016-07-14 13:39:41] — ClayMartin thinks lukeis is trolling so hard :P [2016-07-14 13:39:53] → JohnJansen joined (~JohnJansen@public.cloak) [2016-07-14 13:40:11] jgraham: The only advantage to having the end points in the spec is to allow client language bindings to not have to construct the CSS selectors [2016-07-14 13:40:57] ato: There is a reasonable case to be made to reinstate the additional finder methods [2016-07-14 13:41:29] AutomatedTester: The open-source project has already been updated to use the compliant CSS selectors [2016-07-14 13:42:11] ato: Does the OSS project get it right? [2016-07-14 13:42:23] AutomatedTester: It's been implemented for some time, so I think so. [2016-07-14 13:42:25] — lukeis users and their performance concerns..psh… fix that in the browser / remote implementations, if you see "#someid" implementations can use document.getElementById instead… if they want to parse it ;) [2016-07-14 13:43:03] — lukeis ClayMartin: turns it up to 11 [2016-07-14 13:43:10] lukeis: The point is that there is no performance difference. [2016-07-14 13:43:31] there *shouldn't* be a performance difference you mean? [2016-07-14 13:43:35] No, there isn’t. [2016-07-14 13:43:41] JohnJansen: Browsers have really concentrated on trying to make querySelector(All) as performant as possible. [2016-07-14 13:44:13] lukeis: Because the return types from querySelectorAll and getElementsBy* are different and one is basically a generator, so effectively they have the same perf. [2016-07-14 13:44:14] AutomatedTester: There hasn't been a request from the OSS project to replace the missing locator methods. [2016-07-14 13:44:24] lukeis: I am wrong in my email. [2016-07-14 13:44:30] ok [2016-07-14 13:44:47] lukeis: Like, my testing didn’t walk the generator. [2016-07-14 13:44:49] — lukeis wonders if the scribe now thinks i said something in the meeting :-D [2016-07-14 13:44:49] lukeis: So my test was wrong. [2016-07-14 13:45:10] [General discussion around escaping of selectors] [2016-07-14 13:45:23] ato: How difficult is this? [2016-07-14 13:46:10] ato: What happens if you pass in ? [2016-07-14 13:46:36] — lukeis on a scale of 1 to 10, rate your difficultly level with using css for everything ;) [2016-07-14 13:46:47] (example is an invalid selector) [2016-07-14 13:46:52] — lukeis lol [2016-07-14 13:47:23] JohnJansen: It would still fail, it will just fail in a different way. [2016-07-14 13:47:51] — lukeis don't we currently have an invalid selector exception? [2016-07-14 13:48:27] ato: Embedded 'problematic' characters used inside quotes may give problems [2016-07-14 13:48:28] — lukeis yep… invalid selector [2016-07-14 13:48:49] — lukeis https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors [2016-07-14 13:49:11] https://drafts.csswg.org/cssom/#the-css.escape()-method [2016-07-14 13:49:15] 1468529290416 Marionette TRACE conn0 -> [0,3,"findElement",{"using":"css selector","value":"[id=\"'''\"]"}] [2016-07-14 13:49:20] ato: Example selector - a[href ~= "'"] [2016-07-14 13:49:57] jgraham helpfully provides link to css escaping algorithm. [2016-07-14 13:50:01] — lukeis wonders what this has to do with the spec regarding selectors, does the browser think it's valid or not? [2016-07-14 13:50:32] Direct link: https://drafts.csswg.org/cssom/#serialize-an-identifier [2016-07-14 13:51:22] — lukeis json escaping is the problem here, no? … is confused… ¯\_(ツ)_/¯ [2016-07-14 13:51:23] ato: isn't this an argument for adding back the additional locator methods? [2016-07-14 13:51:43] → JohnJansen_ joined (~JohnJansen@public.cloak) [2016-07-14 13:51:56] ⇐ JohnJansen_ quit (~JohnJansen@public.cloak): "Page closed" [2016-07-14 13:52:30] → JohnJansen_ joined (~JohnJansen@public.cloak) [2016-07-14 13:52:30] jgraham: The three cases we discuss are ID, tag name, and class name [2016-07-14 13:53:03] AutomatedTester: The class name case is interesting because of a historical difference in the OSS project [2016-07-14 13:53:41] AutomatedTester: Class name in the OSS project does not allow spaces, while in the web platform, " foo" (with a leading space) is perfectly valid for By.className [2016-07-14 13:54:29] Resolution: Replace ID, tag name, and class name as element locator methods [2016-07-14 13:54:57] ⇐ JohnJansen quit (~JohnJansen@public.cloak): Ping timeout: 180 seconds [2016-07-14 13:55:12] [General discussion around whether to allow spaces in the class name locator] [2016-07-14 13:55:55] Resolution: The class name locator strategy will allow multiple classes [2016-07-14 13:56:17] — lukeis by class name is back now? huh? [2016-07-14 13:56:42] — lukeis ¯\_(ツ)_/¯ [2016-07-14 13:57:25] jgraham: ID poses a mildly interesting point, given that the platform does not have a plural 'get elements by id' method [2016-07-14 13:58:42] AutomatedTester: Drivers using the OSS project's automation atoms do not use getElementById, they walk the tree [2016-07-14 13:59:05] ⇐ JohnJansen_ quit (~JohnJansen@public.cloak): "Page closed" [2016-07-14 13:59:32] → JohnJansen joined (~JohnJansen@public.cloak) [2016-07-14 14:00:20] jgraham: The reason there is no primitive for "get multiple elements by id" is that there shouldn't be more than one. [2016-07-14 14:01:57] Action: ato to write out element retrieval strategies in spec. [2016-07-14 14:01:57] — RRSAgent records action 4 [2016-07-14 14:03:46] Topic: File upload [2016-07-14 14:04:19] ClayMartin: Uploading files currently hangs off the sendKeys command [2016-07-14 14:04:35] ClayMartin: This is entirely different from everything else sendKeys done [2016-07-14 14:04:43] s/done/does/ [2016-07-14 14:05:16] ClayMartin: Given this, I propose making uploading a file its own end point. [2016-07-14 14:06:08] ato: To give some history, one of the reasons this is so is that it's compatible with how the OSS project does it. [2016-07-14 14:06:52] ato: Also, with HTML5, specialized elements for color, number, date, and so on at one time fell back to plain text fields [2016-07-14 14:07:04] ato: So sendKeys made sense for those. [2016-07-14 14:07:16] RRSAgent: draft minutes [2016-07-14 14:07:16] I have made the request to generate http://www.w3.org/2016/07/14-webdriver-minutes.html lukeis [2016-07-14 14:07:44] ato: Some time ago, we came up with a clever local-end API hack to handle this [2016-07-14 14:07:48] ahhhhhh…. it hasn't been listening since lunch! [2016-07-14 14:07:57] all your notes are for nothing right now jimevans [2016-07-14 14:08:10] RRSAgent: listen [2016-07-14 14:08:10] — RRSAgent is logging [2016-07-14 14:08:19] RRSAgent: please draft the minutes [2016-07-14 14:08:19] I have made the request to generate http://www.w3.org/2016/07/14-webdriver-minutes.html ato [2016-07-14 14:08:44] — lukeis :'( [2016-07-14 14:11:33] — lukeis what's up now? deciding on how to record everything or?? [2016-07-14 14:11:41] https://www.irccloud.com/pastebin/m6BPbXOY/missing-logs.txt [2016-07-14 14:11:53] — jimevans will copy that into the minutes later [2016-07-14 14:12:06] — brrian lukeis: we have the missing logs and will incorporate later somehow [2016-07-14 14:12:15] — lukeis +1 [2016-07-14 14:12:50] [Discussion about HTML5 controls and the need or lack thereof for separate end points for setting those values] [2016-07-14 14:13:57] brrian: What's the common attribute of these controls? [2016-07-14 14:14:50] jgraham: File upload input values can't be set through the DOM [2016-07-14 14:15:43] jgraham: For most things that degrade back to a plain text input, you can set or get the value, but this is not so for type="file" [2016-07-14 14:16:24] jgraham: Conceptually, sendKeys is the wrong command for this, because the user clicks on the button to bring up the file picker [2016-07-14 14:16:41] brrian: Are there other places where we mitigate that? [2016-07-14 14:16:59] ⇐ JohnJansen quit (~JohnJansen@public.cloak): Ping timeout: 180 seconds [2016-07-14 14:17:07] jgraham: There are alerts (user prompts) [2016-07-14 14:17:27] samuong: This seems like it's going to break a lot of things [2016-07-14 14:17:54] JohnJansen: This feels hacky, but it's been around for a really long time, so we probably shouldn't mess with it. [2016-07-14 14:18:43] [Discussion of what DOM methods allow one to do with inputs of type="file"] [2016-07-14 14:19:38] jgraham: I am slightly concerned that users would think that using Actions would work similarly to sendKeys [2016-07-14 14:20:16] ato: But since sendKeys is a "do what i mean" method, it doesn't work the same way. [2016-07-14 14:21:22] ClayMartin: so do we need to specify this? Because it's not in the spec. [2016-07-14 14:22:03] ato: No, it is in the spec (step 11 in the sendKeys command) [2016-07-14 14:22:43] Action: ato to produce language on handling HTML5 form controls in sendKeys command in spec. [2016-07-14 14:22:43] — RRSAgent records action 5 [2016-07-14 14:24:14] jgraham: Another thing that is weird in a similar, but not exactly analogous way, are things like video and audio elements [2016-07-14 14:24:28] brrian: Yes, there are lots of controls inside such an element. [2016-07-14 14:24:46] brrian: These are often implemented using shadow DOM [2016-07-14 14:25:08] brrian: I don't know how you'd interact with any of these with WebDriver [2016-07-14 14:25:30] ato: I imagine I'd pass the element into a helper class in my language that would handle these. [2016-07-14 14:25:51] samuong: But these should be saved for level 2 [2016-07-14 14:26:18] samuong: I think we can agree that using sendKeys for file upload is weird but we shouldn't mess with it now. [2016-07-14 14:27:20] AutomatedTester: We did at one time consider returning more information when finding elements so that language bindings could provide appropriate helper classes [2016-07-14 14:27:58] ato: You're talking about serialization of more information than just the UUID. [2016-07-14 14:28:08] ato: And it's future-compatible. [2016-07-14 14:28:23] AutomatedTester: In a future version of the spec, perhaps we could do this. [2016-07-14 14:29:18] ato: for example, I can envision that one thing we might want to do for a video element is to produce a subset of end points under /video. But that's the "multimedia extensions for WebDriver" [2016-07-14 14:29:39] brrian: These should be specified, but under separate cover. [2016-07-14 14:33:30] RRSAgent: draft minutes [2016-07-14 14:33:30] I have made the request to generate http://www.w3.org/2016/07/14-webdriver-minutes.html jimevans [2016-07-14 14:36:00] ⇐ Guest3 quit (~textual@public.cloak): Ping timeout: 180 seconds