AutoIt - 单击iFrame中的链接

时间:2012-06-19 14:57:24

标签: iframe hyperlink autoit

我是使用AutoIt的新手。我一直在努力使用Internet Explorer单击iframe中的链接。我已经看了几种方法来做到这一点,但没有任何工作。

所以这可能是一个简单的问题。如何使用AutoIt单击iFrame中的链接?链接位于第8帧,文本名称为“People”。

有人可以提供一个例子吗?

我假设我必须使用_IEFrameGetCollection和_IELinkClickByText。我还设法使用_IEFrameGetCollection识别我的页面上的帧总数为9。

1 个答案:

答案 0 :(得分:3)

  

我假设我必须使用_IEFrameGetCollection和_IELinkClickByText。我还设法使用_IEFrameGetCollection识别我页面上的帧总数为9。

正。您可能希望先看到此答案:Can't retrieve links inside Frame

您的代码最终将会出现:

#include <IE.au3>

$URL="http://www.acgme.org/adspublic/"
$MyIExplorer=_IECreate($URL,1,1,1,1)

Local $theFrame = _IEFrameGetCollection($MyIExplorer, 8)

Local $oLinks = _IELinkGetCollection($theFrame)
MsgBox(0, "Link Count", @extended & " links found")