【发布时间】:2010-03-17 18:31:55
【问题描述】:
让 WatiN 在 Win7/IE8 上运行有什么技巧吗?
我的代码:
browser = new IE();
browser.GoTo("http://testserver");
browser.TextField(Find.ByName("txtUser")).TypeText("tyndall");
第三行从来没有真正运行过,我得到一个错误:
System.Runtime.InteropServices.COMException : RPC 服务器不可用。 (HRESULT 异常:0x800706BA)
第二行似乎在运行。 IE8 出现并导航到正确的 URL。
【问题讨论】:
-
您使用的是哪个版本的 WatiN?最新的官方版本(1.3.0)不支持IE8,但是2.0 RC应该没问题。
-
和 Internet Explorer 8.0.7600.16385
-
我收到类似的错误:System.Runtime.InteropServices.COMException:请求的资源正在使用中。 (HRESULT 例外:0x800700AA)在 WatiN.Core 的 WatiN.Core.Native.InternetExplorer.IEBrowser.NavigateTo(Uri url) 的 SHDocVw.InternetExplorerClass.Navigate2(Object& URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers)。 WatiN.Core.Browser.GoTo(String url) 处的 Browser.GoTo(Uri url)
标签: .net unit-testing internet-explorer automation watin