IsObj - The requested action with this object has failed.
13 posts in this topic
I need to bring up a MsgBox when the user clicks a button on the Internet Explorer page.
This is the button on the HTML page:
<button id="NOT_READY_BTN-btnEl" type="button" class="x-btn-center" hidefocus="true" disabled="disabled" role="button" autocomplete="off" data-qtip="ENTRA" style="width: 169px; height: 24px;"> <span id="NOT_READY_BTN-btnInnerEl" class="x-btn-inner" style="width: 169px;">ENTRA</span> <span id="NOT_READY_BTN-btnIconEl" class="x-btn-icon " style="background-image:url(img/icons/ENTRA.gif)"></span></button> Thanks
I am not sure on how to grab the innertext I want. Is there a way I can just grab the second line, or is there a better way to do it all together?
#include <IE.au3> $oIE = _IEAttach("Form Details") $oDiv = _IEGetObjById($oIE, "Col3") ;Phone MsgBox (0,"Oops",$oDiv.outertext) When I use this code I get
_IEGetObjById and _IEGetObjByName functions use variable of an InternetExplorer.Application, Window or Frame object as reference to find any dom element.
Is it possible to use a dom element instead of InternetExplorer.Application, Window or Frame to find target dom element instead the dom element. This will help in finding elements using a parent child relationship where duplicate target dom elements exists on the HTML page.
Other automation tools like WebDriver do have this feature. It would be great to have something like this in AutoIt. I love the way AutoIt works!!!!! Especially the IE UDF. Cool stuff from DALE and other developers.
Ex - i would like to do something like this,
$oIE = _IEAttach("Title")
$oParentObject = _IEGetObjById($oIE, "Parent Widget or element Id which contains my target widget in its hierarchy below")
$oTargetObject = _IEGetObjById(oParentObject , "Id of widget i would like to find and do some action")
This will help in situations where there are widgets with duplicate ids on the page....Ex - 2 Add buttons with same id on the same page.....One add button to add a CAR...another Add button to add a Vehicle. In this case i cannot click on the exact Add button i want just with the Add button id. i will need reference of their immediate parent object to uniquely identify them.
A search of a web page can retrieve 1 to 20 (or more) links split into 20 per page I can go on to the second page by using:
If $x = 20 Then Sleep(2000) ;two seconds $oNext = _IEGetObjById($oIE, "pager1") _IEAction($oNext, "click") _IELoadWait($oIE)
is there a way of sending the doPostBack('pager1','3') information? BTW I just thought (I.m not at my own PC) can I get IEGetObjById by index so somthing like that?