- From: Andreas Tolfsen <ato@sny.no>
- Date: Fri, 2 Feb 2018 15:05:29 +0000
- To: public-browser-tools-testing <public-browser-tools-testing@w3.org>
- Cc: Geoffrey Sneddon <me@gsnedders.com>, John Jansen <John.Jansen@microsoft.com>, Brian Burg <bburg@apple.com>, Clay Martin <clmartin@microsoft.com>, Jonathon Kereliuk <kereliuk@google.com>
Implementations are currently meant to expose the navigator.webdriver WebIDL attribute only when WebDriver is being used to control the UA. There is a proposal in [1] to make this unconditional so that the attribute is always exposed. To borrow Geoffrey’s example, making the attribute selectively present doesn’t itself have any benefit apart from causing web author confusion when for example a document needs to trigger an alternate code path during automation: var underAutomation = ("webdriver" in navigator) ? navigator.webdriver : false; Whereas with almost all other web platform features, one could: var underAutomation = navigator.webdriver; Brian commented in [2] that Safari always exposes the attribute, provided WebKit is built with WebDriver support. This seems reasonable to me and avoids web author confusion. I’m inclined to do the same for Gecko, for which I have a tentative implementation [3]. Before shipping this in Firefox I’d like feedback from Microsoft and Google. [1] https://github.com/w3c/webdriver/issues/1214 [2] https://github.com/w3c/webdriver/issues/1214#issuecomment-361318854 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1169290
Received on Friday, 2 February 2018 15:05:58 UTC