Skip to content

Instantly share code, notes, and snippets.

View raygt's full-sized avatar

Ray Trejo raygt

View GitHub Profile
@raygt
raygt / gist:3138501
Created July 18, 2012 19:59
Selenium 2 Webdriver Iterating Table
I found example 2 on the web but it was not exactly what i needed. so.. I put together example 1.
C# Example 1
public void VerifyTable(string header, string expected)
{
IWebElement table = _driverWithJs.FindElement(By.XPath("//div[@id='main']/table"));
ReadOnlyCollection<IWebElement> allRows = table.FindElements(By.TagName("tr"));