We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
首先让我再次插入 WATiR 的硬件点击鸭子冲头,可以找到 此处。这将允许您对可发现的元素进行硬件左键单击,并且您可以对其进行调整以执行您需要的任何操作。它实际上会获取您的鼠标指针并在坐标上进行顶级单击。
其次,WATiR 中有一种处理模式对话框的方法:
虽然我认为这是特定于版本的,但您可能需要挖掘旧版本。
第三,是的。是的。以下是一些有用的资源:
AutoIT win 消息代码列表
使用 Ruby 的 AutoIT
Steve Swanson 很有帮助
Watir 中还有一种发送击键的方法:
browser.SendKeys("boo{TAB}{ENTER}")
但实际的“这是如何在 WATiR 中使用 AutoIT 与模态窗口交互”?不是我见过或能找到的。如果您希望采用这种方法,您可能需要搜索“Ruby AutoIT”而不是“WATiR AutoIT”。
Firstly let me again plug the hardware click duck punch for WATiR, which can be found here. This will allow you to do hardware left clicks on discoverable elements, and you can tweak it to do whatever you need. It will literally take your mouse pointer and do a top-level click at the coordinates.
Secondly there is a method in WATiR to handle modal dialogs:
Although I think this is version specific, you may have to dig out an older version.
Thirdly, yes. Ish. Here are some resources that will be helpful:
List of AutoIT win message codes
AutoIT with Ruby
Steve Swanson being all helpful
There is also a method in Watir to send keystrokes:
browser.SendKeys("boo{TAB}{ENTER}")
But an actual "This is how to use AutoIT in WATiR to interact with modal windows"? Not that I've ever seen or can find. If you wish to take this approach you may want to search for "Ruby AutoIT" rather than "WATiR AutoIT".
每个 AutoIt 安装都默认附带一个关于自动化记事本 (notepad.exe) 的教程,该教程还涉及当要求您保存文件时出现的模式窗口。本教程解释了绝对的基础知识,根据您自己的专业知识,这些基础知识可能不是您所需要的。如果您需要更具体的答案,请澄清您要做什么。最后一点,我想补充一点,没有关于如何专门处理 Watir 或 Firewatir 的教程。
Every AutoIt installation comes by default with a tutorial on automating Notepad (notepad.exe), which also deals with the modal window that appears when you are asked to save a file. The tutorial explains the absolute basics, which depending on your own know-how, might not be what you need. If you need a more specific answer, then clarify what you're trying to do. As a final note, I want to add that there are no tutorials on how to deal with Watir or Firewatir specifically.
使用 Ruby 功能访问 AutoIt 方法。
搜索这些行:
需要“win32ole”; au3 = WIN32OLE.new("AutoItX3.Control")
Watir 可以轻松地自行处理不同的弹出窗口。请查看此处。
Use Ruby ability to access AutoIt methods.
Search for these lines:
require 'win32ole'; au3 = WIN32OLE.new("AutoItX3.Control")
Watir can handle different pop-ups on its own with little efforts. Look here.