excel - Vba在html元素上触发'pointerdown'事件
问题描述
作为 excel vba 中网页自动化项目的一部分,需要帮助触发 html 元素上的“pointerdown”事件。
已经能够使用“mousedown”触发器成功地自动化,但最近网页源代码已被修改为使用“pointerdown”来触发而不是“mousedown”。
现有的“mousedown”代码:
Set e1 = IE.Document.createEvent("MouseEvent")
e1.initMouseEvent "mousedown", True, True, 0, 1, 0, 0, 0, 0, True, False, False, False, 0, Null
ElementCol.Item(i).dispatchEvent e1
尝试了以下“pointerdown”代码,但 excel 在 initPointerEvent 行上抛出“Automation error”:
Set e1 = IE.Document.createEvent("PointerEvent")
e1.initPointerEvent "pointerdown", True, True, 0, 1, 0, 0, 0, 0, False, False, False, False, 0, Null , 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, False
ElementCol.Item(i).dispatchEvent e1
任何帮助将不胜感激。
解决方案
推荐阅读
- r - 基于 r 中单独列中的单个输入删除列中的一组输入
- woocommerce - WooCommerce 产品导入元数据包
- javascript - 无法删除 Typeahead react-bootstrap 中的输入内容
- node.js - Jest 挂在 Supertest 的 POST 上并且不执行“posttest”脚本
- python - 计算两个列表的所有 IoU 的有效方法
- python - 程序一直说'str'对象不可调用
- ios - 如何让监听器在 Firebase 中工作以在离线时进行多位置更新
- speech-to-text - 语音服务 STT - 可以将请求链接到结果吗?
- python - 如何访问当前文件夹目录之外的代码?
- search - 在 Yii2(网格视图)getter 参数中对计算字段进行排序