WatiN - 绕过证书错误页面
有人知道如何在 WatiN 中使用 CertificateWarningHandler 吗?
我已经...
IE ie = new IE("https://mysite.aspx");
CertificateWarningHandler cwh = new CertificateWarningHandler(CertificateWarningHandler.ButtonsEnum.Yes);
cwh.HandleDialog(new Window(ie.hWnd));
...这完全没有任何作用。
更一般地说,你们到底是如何使用这个工具的?该文档几乎毫无用处,而且网上似乎没有任何像样的资源。我肯定漏掉了一些东西,因为我花了大约半个小时才写了 3 行根本不起作用的代码。
Anyone know how to use CertificateWarningHandler in WatiN?
I've got as far as...
IE ie = new IE("https://mysite.aspx");
CertificateWarningHandler cwh = new CertificateWarningHandler(CertificateWarningHandler.ButtonsEnum.Yes);
cwh.HandleDialog(new Window(ie.hWnd));
... which does precisely nothing.
On a more general note, how on earth do you people manage to use this tool? The documentation is nearly useless, and there doesn't seem to be any decent resource online. I must be missing something because it's taken me about half an hour to write 3 lines of code that don't even work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用的东西类似于萨尔正在使用的东西,它工作得很好(我的测试是跨浏览器的)。
//覆盖浏览器中的安全警告
{
我不是开发人员,但我发现有大量关于 WatiN 和其他帖子代码示例之类的信息,这些信息确实很有帮助。在寻求 WatiN 帮助方面,Google 是我最好的朋友之一。你会掌握窍门的。
I'm using something similar to what Saar is using and it works fine (my tests are cross-browser).
//Override security warning in browser
{
I'm not a developer, and I've found that there's plenty of information out there on WatiN and others post code samples and the like that are really helpful. Google is one of my best friends when it comes to finding WatiN help. You'll get the hang of it.
你已经尝试过关注了吗?
或者只是
更新:评论后。
实际上这对我有用。
进一步可能会有所帮助
have you tried following already?
or just
Update: After comment.
Actually this works for me.
further may be following will help