Check for accessibility id matching selector first and then fall back to string match.
Merge pull request #2707 from jdeff/bug/2593

Check accessibility identifier first for the id strategy