powershell - 使用 Powershell 通过 IE 使用 JavaScript 时的空文档
问题描述
我正在编写一个脚本来自动化工作中的无用任务。通常,一切都很好,但有时会运行 JavaScript 以加载特定页面,然后我的所有文档都是空的。
示例:
$Page = New-Object -ComObject «InternetExplorer.Application»
...
$frame = $Page.document.frames
...
# The script navigates well, set some values get others everything is fine and then:
$frame.item(3).IHTMLDocument3_getElementById(«oAff1»).children[0].(...).click()
# It does the click, the browser loads the new page and:
$frame.item(3).document
# Returns nothing, it seems to load in IE but not for Powershell who still see a white page.
有任何想法吗?
解决方案
推荐阅读
- windows - 有人一起使用过统一写入过滤器 (uwfmgr) 和 netsh 吗?运行 netsh 然后重新启动后,我看到了一些问题
- java - Can I ignore a getter-based write-only property during deserialization in Java Jackson?
- javascript - Reducing a 2D array taking into account another 2D array
- java - how to override default hazlecast.xml configuration?
- r - 使用 dplyr 根据阈值创建新的数据帧
- mongodb - 仅过滤所有字段非空的文档(使用聚合框架)
- distributed-system - 有人试过在 cockroach db 上运行 cadence
- django - 未处理的拒绝(TypeError):this.state.persons.map 不是函数
- git - 尝试让 Jenkins ssh 访问私有 github 存储库时权限被拒绝
- r - 在 geom_histogram 中使用第三个变量作为填充美学