I am attempting to find a table cell using a CSS selector in Selenium. This is my selector:
//table[@id='prepaymentItemsDataGrid']//tr[@class='tablerowlight']/td[3]
The exception being thrown is:
Driver.FindElementByCssSelector("//table[@id='prepaymentItemsDataGrid']//tr[@class='tablerowlight']/td[3]") threw an exception of type 'OpenQA.Selenium.InvalidSelectorException'
What is wrong with my selector? How do I know what Selenium is complaining about?
I have tried simplifying it to:
//table[@id='prepaymentItemsDataGrid']
which has no effect.
Does Selenium have a different method of executing CSS selectors and how can I check that the selector is valid before trying to run it?