javascript - 如何在 Node js 中调用击键 CTRL+V?
问题描述
如何在 nodejs 中调用模拟键 CTRL+V ?我使用 nwjs,在我使用 Iframe 的应用程序中,我在其中找到元素输入。对于这个输入,我想运行事件 CTRL+V(粘贴)。由于我已经有一个复制的值,我想为此输入运行一个粘贴事件。
我想尝试通过 document.execCommand('paste')。但是在输入内部不可能执行事件 document.execCommand('paste')。
我该如何实施?
解决方案
推荐阅读
- java - 在新帐户的空片段中显示提示
- python - 快速找到具有最大总不同元素的列表列表的子集
- c - 如何在 Clion 的屏幕缓冲区大小处设置不换行
- php - 如何在 URL 中正确显示 PHP/MySQL 的具有相同 GET 名称的多个参数
- sql - 在插入数据库之前序列化 JSON
- python - 给定不带引号的字符串,literal_eval 返回格式错误的字符串
- youtube - 列出带有给定单词的视频
- php - 如何将_filters 应用于由 add_action 执行的自定义函数?
- ios - Xcode UI 测试:如何在手势进行时检查 UI 中的内容?
- java - 当我有 ManyToMany 关系(spring-boot/spring-data-jpa)时如何更新子实体列表?