Check for accessibility id matching selector first and then fall back to string match