Sign in to follow this  
Followers 0
megatracer

Clicking a javascript link within an iFrame

2 posts in this topic

Hi guys,

I have seen there is a bunch of similar topics, but for some reason (probably because I´m really a beginner with AutoIt and do not have other programming experience) what I have seen there didn´t really help me.

Here is what I have -

<iframe id="x" name="x1" title="x2" src="...">

...

<a class="yy" id="yy1" title="yy2" onkeydown="yy3" href="javascript:void(0)" target="" onclick="yy4">yy5</a>

</iframe>

End result - I need to click the link within the iframe.

I already tried ControlClick and _IELinkClickByText.. unfortunately this was in vain.

_IELinkClickByText($oIE, "yy5") resulted in

--> IE.au3 V2.4-0 Warning from function _IELinkClickByText, $_IEStatus_NoMatch

ControlClick - tried different combinations, nothing worked, without any errors in the log. Also, I could not get any information about the ControlID, because the AutoIT info tool is showing absolutely the same info for everything on the page..

I know that I probably have to use either _IEFrameGetObjByName or _IEFramgeGetCollection, but I am too dumb to implement this :)

The only few strings I have at the beginning are to open the page:

#include <IE.au3>

$oIE = _IECreate()

_IENavigate($oIE, "http://..")

I would really appreciate your help and suggestions!

Thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

do this help?

#include <IE.au3>
$oIE = _IECreate ("Page");get page object
$oFrame = _IEFrameGetCollection ($oIE, 0);get first frame (0 index numerated in this case) object from main page object
_IELinkClickByText($oFrame, "yy5");click link from frame object from its text
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0