WatiN - Find HTML Table

老子叫甜甜 提交于 2019-12-24 13:26:01

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!