# Pastebin m6BPbXOY [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 :'(