The WebDriver-W3C Candidate Recommendation clearly mentions the following points:
- The Find Element command is used to find an element in the current browsing context that can be used for future commands.
- Let location strategy be the result of getting a property called "using".
- Let selector be the result of getting a property called "value".
- The result of getting a property with argument name is defined as being the same as the result of calling Object.
GetOwnProperty(propertyName)
.
GetOwnProperty(propertyName)
in ECMAScript? Language Specification is defined as :
String objects use a variation of the GetOwnProperty internal method used for other native ECMAScript objects. This special internal method provides access to named properties corresponding to the individual characters of String objects.
Browser Specific Implementation
I did a small test with all the info you have provided with Search Box
of Google Home Page
i.e. https://www.google.co.in
with all the major variants of WebDrivers
and here is the result :
ChromeDriver
- OSS
:
[[ChromeDriver: chrome on XP (0d24fd038bde751b1e411711271c3e69)] -> name: q]
[[ChromeDriver: chrome on XP (0d24fd038bde751b1e411711271c3e69)] -> name: q]
FirefoxDriver
- W3C
:
[[FirefoxDriver: firefox on XP (e7a56813-97c5-466e-9c35-24c9f89af6ed)] -> name: q]
[[FirefoxDriver: firefox on XP (e7a56813-97c5-466e-9c35-24c9f89af6ed)] -> name: q]
InternetExplorerDriver
- W3C
:
[[InternetExplorerDriver: internet explorer on WINDOWS (367257db-cdbc-4be7-aeac-805a21ad9d2d)] -> name: q]
[[InternetExplorerDriver: internet explorer on WINDOWS (367257db-cdbc-4be7-aeac-805a21ad9d2d)] -> name: q]
So as you can observe from the field details of the concerned value field returned is in similar pattern and till the WebDriver variant passes the correct reference to user it shouldn't be a obstacle.
Finally, it is worth to mention at this point of time that like FirefoxDriver and InternetExplorerDriver (both being W3C compliant), ChromeDriver is almost W3C compliant and may vary from a few functional aspects.
Update A
As per your question and update, you are pretty right about ChromeDriver and Chrome communication protocol. Getting more granular we can find some difference in the webdriver
call as follows :
So, Firefox Browser returns :
"value":{"element-6066-11e4-a52e-4f735466cecf":"6e35faa4-233f-400c-a6c7-6a66b54a69e5"}
So, Chrome Browser returns :
"value": {"ELEMENT": "0.7086986861512812-1"}
What matters most to we user is the value of the element returned by the browser object which is always referred by an user and correctly identified by the webdriver
instance. All these inner logic becomes abstract
to the end user.
Update B
Adding some significant bytes from @FlorentB. 's comments :
The earlier versions of Selenium i.e. Selenium v2.x used the keyword ELEMENT to store the reference of a DOM Tree element. This key was changed within the recent versions of Selenium i.e. Selenium v3.x to element-6066-11e4-a52e-4f735466ce. Most of the implementation of the current ChromeDriver is still from the Selenium 2.x specifications.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…