Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/264.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_Tags_Watin - Fatal编程技术网

C# WatiN内部标记

C# WatiN内部标记,c#,html,tags,watin,C#,Html,Tags,Watin,我正在试用WatiN来测试一个站点。 站点结构看起来有点像这样: <html> ... <ElementContainer src=...> <html> ... <body> <table border=0> ... // I want to click things in here. </table> ... </body> </html> </ElementContainer> ..

我正在试用WatiN来测试一个站点。 站点结构看起来有点像这样:

<html>
...
<ElementContainer src=...>
<html>
...
<body>
<table border=0>
... // I want to click things in here.
</table>
...
</body>
</html>
</ElementContainer>
...
</html>

编辑2:我试图编写ElementContainer的InnerHtml。。。它只打印了一个空格

如果HTML无效,那么失败的程度真的很重要吗你有没有考虑过首先构建有效的HTML?@AlexeiLevenkov HTML是完全有效的-这是一个非常著名的网站,我被雇来测试,我没有创建,也不能更改。不,它完全无效。您有两个嵌套的块。html文件只能有一个块。@MarcB如果相关,第二个块是通过Javascript创建的。如果您想查看更多代码,我很乐意与您分享-无论如何,该网站现在已经启动并运行。
ElementContainer<Element> a = (ElementContainer<Element>)browser.Element(Find.BySrc("Source here")); // get Container
<script>
    function googleTranslateElementInit() {
      googTr = new google.translate.TranslateElement({
        pageLanguage: 'en',
        multilanguagePage: true,
        gaTrack: true,
        gaId: 'UA-1307731-4',
        layout: google.translate.TranslateElement.InlineLayout.SIMPLE
      }, 'google_translate_element');
      if (typeof(googleTranslateElementFullyLoaded) !== 'undefined') {
          setTimeout(googleTranslateElementFullyLoaded, 1000);
      }
    }
    </script>