Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WatiN检查生成的表_C#_Html_Watin_Dynamic Tables_Browser Testing - Fatal编程技术网

C# WatiN检查生成的表

C# WatiN检查生成的表,c#,html,watin,dynamic-tables,browser-testing,C#,Html,Watin,Dynamic Tables,Browser Testing,我正在使用WatiN测试一个浏览器应用程序 当我按下按钮时,浏览器中会添加一个新表-如下所示: <table border="0"> <tr> <td> <a></a> <a></a> <a></a> <!-- ... --> <

我正在使用WatiN测试一个浏览器应用程序

当我按下按钮时,浏览器中会添加一个新表-如下所示:

<table border="0">
    <tr>
        <td>
            <a></a>
            <a></a>
            <a></a>
            <!-- ... -->
            <a></a>
        </td>
        <td>
            <a></a>
            <a></a>
            <a></a>
            <!-- More anchors -->
            <a></a>
        </td>
        <!-- More TDs -->
        <td>
            <a></a>
            <a></a>
            <a></a>
            <a></a>
        </td>
    </tr>
</table>
我得到一个异常-没有“border”属性设置为“0”的表

我仔细检查了名字和所有东西

函数调用:

static void MakeItGlobal(IE browser)
{
    ...
    //Press the button that creates the table - works. I'm certain.
    pressTableCell(browser, "border", "0", 1, 2, 2);
    ...
}

我的问题是-为什么我会得到例外?WatiN难道不知道如何处理动态表格吗?

这感觉像是一种竞赛条件。在WatiN尝试按下table单元格后,客户端上的JavaScript可能会将表附加到文档中?你能给我们介绍一下这个特殊测试的背景吗?@GregBurghardt我明白了,很高兴。通常,站点是他们开发的应用程序;它在许多不同的语言上运行。要更改语言,用户需要按下“更改语言”菜单按钮-一旦他这样做,javascript将显示一个新表,其中显示了他们可以选择的各种不同语言。一旦他们选择了一个,整个网站就会改变;我想做的是改变语言,然后点击一个按钮在网站上进行操作。最后,我希望能够再按几个按钮,然后打印站点的HTML。
static void MakeItGlobal(IE browser)
{
    ...
    //Press the button that creates the table - works. I'm certain.
    pressTableCell(browser, "border", "0", 1, 2, 2);
    ...
}