I was writing some helper methods for our testers around the IWebDriver in .NET, and started wondering whether there was any point in have a method to get an element by ID when you can use a CSS selector to also get the element by ID.
I would assume that, in the end, a request for CSS "#myelement" will be optimised away to document.getElementById("myelement") anyway.
Is there a performance difference? Should we bother using By.Id and By.Name when we can use CSS selectors to accomplish the same thing?