Discriminate between XPath and CSS selectors automatically.