I was working with a site and trying to select an element via its
<p id="select.me.by.id">Select Me By My id</p>
Simples thought me:
So I did what all good Selenium debuggers do… I tried in the browser but Chrome didn’t match it.
Tempted though I was to blame Chrome, I tried with XPath, and that worked fine:
After a bit of web searching, the solution was clear.
In CSS I wasn’t saying, find the id
I was saying find the id
select with class
id which was not at all what I wanted.
Fortunately CSS offers escaping, which I didn’t realise.
Until the app is fixed I can locate the id using CSS with: