Jump to content
Sign in to follow this  

Unable to Click inside FRAMESET

Recommended Posts


I have used _IEAction() successfully, even previously in this same script in similar situations.

I am trying but failing :) to get the _IEAction($o_object,"click") to work in the following situation:

Within a FRAMESET with two frames, the ID="Upload" object is in the first frame.

relevant AutoIT code :

$oFrameSetTag = _IETagNameGetCollection($oIE,"FRAMESET",0)

$oFrame = _IEFrameGetCollection($oFrameSetTag,0)

$oForm = _IEFormGetObjByName($oFrame,"aspnetForm")

$oDiv = _IEGetObjById($oForm, "ApplicationBody")

$oDiv2 = _IEGetObjById($oDiv, "ContentZone")

$oDiv3 = _IEGetObjById($oDiv2, "ImagesSection")

$oUL = _IETagNameGetCollection($oDiv3,"ul",0)

$oLI = _IETagNameGetCollection($oUL,"li",2)

$oA = _IETagNameGetCollection($oLI,"a",0)

_IEAction($oA, "click")

Everthing looked from the error traps until the

$oUL = _IETagNameGetCollection($oDiv3,"ul",0)

line, where my error trapping returns @error as zero and @extended=12.

This happens even though there is clearly only one <ul> tag at this point in the code,

with 3 <li> tags under it.

IT is one of these tags which I am trying to click, specifically

<li><a id="Upload">Upload Images</a></li>

Attempts to directly access the id="Upload" using _IEGetObjByID() fails unless within

the <li> structure itself.

Thanks for any help anyone can offer.



to look at the HTML code copy and paste the following


;This is the HTML Code I am working with:

<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Vendor Web</TITLE>

<script src="Scripts/fooBar.js" type=text/javascript></SCRIPT>

<script src="Scripts/fooBar.Application.js" type=text/javascript></SCRIPT>

<script language=javascript type=text/javascript>

var Application;

Event.observe( window, 'load', InitializeFrames );

function InitializeFrames()


Application = fooBar.Application();



</HEAD><FRAMESET id=FrameContainer border=0 name=FrameContainer frameSpacing=0 rows=*,135 frameBorder=no><FRAME id=MainFrame border=0 name=MainFrame marginWidth=0 marginHeight=0 src="Home/Home.aspx" frameBorder=0 noResize><FRAME id=FilmStrip border=0 name=FilmStrip marginWidth=0 marginHeight=0 src="Order/ImageGallary.aspx?FilmStrip=true&amp;OrderId=999999999" frameBorder=0 noResize></FRAMESET></HTML>

;The Frame within the FRAMESET breaks down like this :



<form name="aspnetForm" method="post" action="OrderImages.aspx?orderId=15371370900&amp;navContextID=OrderImages&amp;forceMove=1&amp;IgnoreErrors=1" id="aspnetForm">


<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEzNTg4ODI3MzhkZOUU7DTgfSVUht+BwPOzPuZl5bdE" />


<input type="hidden" id="surveyState" name="surveyState" value="" />

<div id="header">

<div class="logo">





<div class="utility_nav">


<li class="first"><a id="LogOutBtn" href="#">Log Out</a></li>

<li><a id="MyAccountLnk" href="../UsersHandling/PasswordExpired.aspx">My Account</a></li>



<img src="../Order/Images/background/vender.gif" alt="Vender Web: Vender Access Data System" width="140" height="26" border="0" />


<div id="top_nav">

<ul id="topNavUnorderListId">

<li id="homeTab"><a href="../Home/Home.aspx">Home</a></li>

<li id="ordersTab" class="on"><a href="../Order/OpenOrders.aspx?dept=all">Orders</a></li>


<a id="ctl00_ctl00_helplink" href="javascript:RH_ShowHelp(0,'../help/vendor_web.htm',HH_HELP_CONTEXT,31)"><img src="../images/content/btn_help.gif" alt="Help" border="0" height="25" width="55" /></a>



<input type="hidden" id="survey" name="survey" value="" />

<input type="hidden" id="OrderId" name="OrderId" value="9999999999999" />

<input type="hidden" id="rLeftNavLoc" name="rLeftNavLoc" value="" />

<div align="center">

<div id="ApplicationBody">

<div id="orderNavigation"></div>

<div id="LeftNav">

<ul class="LeftNavigation" style="margin-bottom: 15px;">


<a onclick="gotoOrderDetail()" style="color: Black; font-weight: bold;">Order Details</a>



<div id="LeftNavCenter">



<div id="RightSection">

<div style="float: left; text-align: left;">

<h1 style="padding: 0; margin: 0; font-size: 16pt; font-weight: bold;">Order Images</h1>

&nbsp; <b>Loan Type:</b> REO

&nbsp; <b>Order #:</b> 99999999

&nbsp; <b>Address:</b> 123 Street Av, AnyCity ST


<div style="float: left; text-align: right;">

<img id="CloseBtn" src="../Order/Images/content/btn_close.gif" alt="Close current work order" align="right" style="float: right;" /><img alt="Refresh Page" id="RefreshBtn" src="../Images/content/btn_Refresh.gif" style="display: none; float: right; cursor: hand; margin-right: 5px;" />


<div id="ContentZone" style="height: auto;">

<div id="MessageCenter"></div>

<div id="ImagesSection" class="Section Container">

<div class="Caption">

Order Images


<div class="body">

<div class="Section Container Collapsable">

<div class="Caption Expanded">

Current Order - #99999999


<li style="background-image: none;"><a id="DeleteImages">Delete Selected Images</a></li>

<li><a id="SelectAll">Select All Images</a></li>

<li><a id="Upload">Upload Images</a></li>



Share this post

Link to post
Share on other sites

Add _IEErrorHandlerRegister() to the top of your script and run it in SciTE so you can see the messages in the console pane. Most likely you'll find something like "Access Denied" due to cross-site scripting security limitations. But you'll get some clues no matter what.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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