I am using selenium to automate some test cases but I am having some issues finding some elements that don't have a certain style. I have created this Xpath that works perfectly in Chrome but when I run it using selenium it doesn't work as I want.
XPATH: ./td[not(contains(@style, 'foo'))]
So basicaly the HTML looks like this:
<tr id='something'>
<td style='foo'><td/>
<td style='foo'><td/>
<td style='foo'><td/>
<td style='foo'><td/>
...
<td>1<td/>
<td>2<td/>
<td>3<td/>
</tr>
So basically I want the last 3 tds so First I get the row and then I sent the Xpath. . . something like this:
var row = driver.FinElement(By.Id("something"));
ReadOnlyCollection<IWebElement> items = row.FindElements(By.Xpath(./td[not(contains(@style, 'foo'))];
But as a result I am getting all the children of the tr.
Any Idea why the Xpath is working on Chrome developer tools and don't work with selenimun IE driver?