html - 在 vba 中引用 iframe
问题描述
由于我之前的问题不再适合,我正在创建一个新问题。
我有以下代码来打开一个窗口。在那个窗口中,我想打开排序“功能”,然后选择要排序的属性。
- 翻页作品
什么不起作用,是试图解决排序下拉菜单的属性,以便它可以选择正确的。我总是进入debug.print length = 0
最后一个代码行
编码:
Sub testalt()
Dim HTMLDoc As MSHTML.HTMLDocument
Dim ie As InternetExplorerMedium
Dim enumm As String
Dim ifrm As MSHTML.HTMLDocument
Dim selection As MSHTML.IHTMLElementCollection
enumm = "E2711846"
Set ie = New InternetExplorerMedium
ie.Visible = True
ie.navigate "https://plm.corp.int:10090/enovia/common/emxFullSearch.jsp?pageConfig=tvc:pageconfig//tvc/search/AutonomySearch.xml&tvcTable=true&showInitialResults=true&cancelLabel=Close&minRequiredChars=3&genericDelete=true&selection=multiple&txtTextSearch=" & [enumm] & "&targetLocation=popup"
Do While ie.readyState <> READYSTATE_COMPLETE
Loop
Set HTMLDoc = ie.document
Set ifrm = HTMLDoc.frames(1).document
Set selection = ifrm.getElementsByTagName("select")
Debug.Print selection.Length
End Sub
我认为这是打开页面的相关 html 部分。Sry 不知道如何复制它
这是 iframe,它在顶部
解决方案
推荐阅读
- angular - canMakePayment() 在 LOCALHOST 中总是返回 null
- javascript - React-Native 如何更改每个项目的状态值?
- python - 如何在 python 中执行构造函数重载?
- css - 如何使用现有的 css 网格从路由器模块调整角度分量
- node.js - 参数 'info' 隐式具有 'any' 类型
- python - Pandas:基于包含字典的公共列合并 2 个数据框
- javascript - React useEffect 和 useState 返回一个数字而不是一个对象
- javascript - 如何在 TAG 上附加两个不同的 ID
- php - 如何只选择特定版本在我的满意项目中构建?
- node.js - `agenda.js` 如何计算`every()` 操作的时区