对象"JScriptTypeInfo"的方法“框架"失败 [英] Method 'frames' of object 'JScriptTypeInfo' failed
本文介绍了对象"JScriptTypeInfo"的方法“框架"失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在通过excel VBA进行Internet Explorer 9的自动化,当我到达下面的最后一行时,它将引发错误:
I am working on automation of internet explorer 9 through excel VBA, it throws an error when I reach on the last line below:
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate "https://example.com/Main.asp"
'delay till readystate is complete
Set doc = ie.document
Set doc1 = doc.frames(2).document 'here comes the error
任何人都可以帮忙吗?
推荐答案
我遇到了同样的问题,问题得到解决
i Have face the same issue and it got resolved
这将适用于IE 10 +
This will work for IE 10+
设置doc = ie.document.frames
Set doc = ie.document.frames
设置doc1 = doc.frames(2)
Set doc1 = doc.frames(2)
对于脚本元素,不再支持readyState.从Internet Explorer 11开始,请使用onload
For the script element, readyState is no longer supported. Starting with Internet Explorer 11, use onload
这篇关于对象"JScriptTypeInfo"的方法“框架"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文