WatiN - Find HTML Table

2019-08-02 23:24发布

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!

标签: watin
1条回答
Fickle 薄情
2楼-- · 2019-08-02 23:57
browser.Table(Find.ByClass("tablePpal") && Find.ByIndex(1))
查看更多
登录 后发表回答