问题
I´m trying to get the values of TDs inside a table using WatiN. The problem is that I´m not able to select a table by Id (because it´s missing) and three tables have the same CSS class:
table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0'
table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0'
table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0'
I need to select second table TDs. I tryed:
Table _table = browser.Table(Find.ByClass("tablePpal"));
Unfortunately that code does not return a collection of tables, only the first one found. How can I select the second table?
Thanks!
回答1:
browser.Table(Find.ByClass("tablePpal") && Find.ByIndex(1))
来源:https://stackoverflow.com/questions/6638524/watin-find-html-table