更新时间:2023-01-23 23:40:12
如果没有人能告诉我如何用WatiN解决这个问题,我将不得不摆脱它,并以旧的方式去做:
If no one can tell me how to solve this with WatiN, I will have to get rid of it, and do it in the old way:
foreach (SHDocVw.IWebBrowser2/*or dynamic*/ ie in shellWindows)
{
if (ie.Document.Title.Contains("XYZl"))
ie.Document.Script.execScript("doit();", "javascript");
}
至少它是有效的,并没有挂起我的应用程序。
这是一个相当简短的解释: http://blog.likewise.org/2012/03/shdocvwshellwindows-and-iwebbrowser2- in / [ ^ ](和一些补充: http://***.com/questions/6530083/cannot-add-c-windows-system32-shdocvw-dll-to-my-project/8541532#8541532 [ ^ ])
无论如何,我希望在WatiN中找到解决方案,但至少它不再那么紧急了。
At least it works, and does not hung my application.
Here is a quite good and short explanation for it: http://blog.likewise.org/2012/03/shdocvwshellwindows-and-iwebbrowser2-in/[^] (and some additions: http://***.com/questions/6530083/cannot-add-c-windows-system32-shdocvw-dll-to-my-project/8541532#8541532[^])
Anyway, I am hoping for a solution in WatiN, but at least it is not that urgent anymore.