在 Watir & 中通过 keydown 和 keyup 事件传递键码火瓦提尔
我需要在 Web 客户端中自动与自定义 jQuery 富文本编辑器进行交互。 与我们的开发人员交谈后,我只需要能够触发以下事件; keydown、keyup、mousedown、mouseup 和粘贴。
那么真的需要一种能够通过 fire_event keydown 和 keyup 调用 WATIR 和 FIREWATIR 传递关键代码的方法吗?
有人在这方面取得过成功吗?
I need to automate interaction with a custom jQuery rich text editor in our web client.
Having talked with our developers I would only need to be able to fire the following events;
keydown, keyup, mousedown, mouseup and paste.
So really need a way of being able to pass a key code with the fire_event keydown and keyup calls for WATIR and FIREWATIR?
Has anyone had any success in doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您尝试过 send_keys 方法吗?我知道 watir-webdriver 支持它,并且它似乎正在迅速成为驱动 Firefox 的首选方式
Have you tried the send_keys method? I know watir-webdriver supports it, and it seems that is rapidly becoming the preferred way of driving firefox
很久以前我也有类似的需求。我相信,你最好的选择是
我刚刚在包含 jquery 的某个页面上尝试了以下操作:
所以,基本上,你制作一个事件并在你需要的任何元素上触发它,
整个图片可能看起来像这样:
i had a similar need a long time ago. I believe, your best bet is
I've just tried the following on some page with included jquery:
so, basically, you craft an event and trigger it on any element you need
the whole picture might look something like: