The switch to a w3c enabled chromedriver has exposed an incompatibility between selenium and chromedriver in that we're unable to find elements by "name" with name values that contain special characters.
For example:
A POST to /session/{session id}/element to locate an element by name with a value of "fields['companyName']" has the following body.
{
"using": "css selector",
"value": "*[name='fields['companyName']']"
}
...responds with a 400 - invalid selector: An invalid or illegal selector was specified...
Whereas escaping name characters successfully finds the element:
{
"using": "css selector",
"value": "*[name='fields\\[\\'companyName\\'\\]']"
}
If I set the w3c chrome option to false, the request body values do not need to be escaped. The same POST to /session/{session id}/element has the following body:
{
"using": "name",
"value": "fields['companyName']"
}
...and succeeds (without escaping special characters).
Will the selenium bindings be updated to escape characters in the request body to bring selenium in line with the chromedriver api?
I couldn't find this listed as a bug against chromedriver or selenium. I've cross posted this issue in chromedriver-users https://groups.google.com/forum/#!topic/chromedriver-users/GZH7mFLk3O4