【问题标题】:document.readystate throwing COMExceptiondocument.readystate 抛出 COMException
【发布时间】:2014-11-06 18:04:30
【问题描述】:

我正在开发一个基于 mshtml C# IE 11 自动化的项目,当我登录网站并检查文档的 readystate 属性时,它会引发 COMException。相同的代码适用于 IE 8,没有任何问题:

while (document.readyState != "complete")
{
//do nothing
}

有人可以帮忙吗?

【问题讨论】:

  • 你能给我们提供COMExceptionToString吗?
  • 'doc.readyState' 引发了“System.Runtime.InteropServices.COMException”类型的异常。未找到成员。 (来自 HRESULT 的异常:0x80020003 (DISP_E_MEMBERNOTFOUND))
  • @HansPassant - 对于 SHDocVw.InternetExplorer 的 html 文档,没有 DocumentCompleted 事件。你能帮忙吗??

标签: c# internet-explorer exception automation mshtml


【解决方案1】:

尝试document.readyState 而不是doc.readyState

【讨论】:

    猜你喜欢
    • 2018-07-02
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    • 2017-09-01
    • 1970-01-01
    • 2012-08-23
    相关资源
    最近更新 更多