Dipendra Posted April 4, 2008 Posted April 4, 2008 Hi everyone... Problem is that the UI has a button class which is defined in a css file. How do i get a reference to this... Here is the jsp: <form name="NewForm" action=XXX method="post"> <table align="center"> <tr> <td width="150" valign="top" nowrap > <div id="leftLayer" class="leftLayer"> <div class="buttonTitles">For the Page</div> <div class="button"><div class="back"><a class="button" href="java script:submitForm('AddItem')">Submit</a></div></div> .............................. .................. ........ <table border="1" width="100%"> <input type="hidden" name="pageaction"> <tr><td> <table cellspacing="1" cellpadding="3" width="100%"> <tr > .............. ......... ..... Now if i use this piece of code: $oIE = _IECreate ("http://www.xxx.com/") $oForm = _IEFormGetCollection ($oIE,0) $oText = _IEFormElementGetObjByName ($oForm, "pageaction") _IEAction($oText,"click") This wont work... Actually if i could get a reference to the Submit button that would solve my problem.. but that class is defined in some css file Is there a way out of this mess
BrettF Posted April 4, 2008 Posted April 4, 2008 $oIE = _IECreate ("http://www.xxx.com/") $oForm = _IEFormGetCollection ($oIE,0) $oText = _IEFormElementGetObjByName ($oForm, "button") _IEAction($oText,"click") I'm thinking that would work better?? Not sure though. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Dipendra Posted April 5, 2008 Author Posted April 5, 2008 $oIE = _IECreate ("http://www.xxx.com/") $oForm = _IEFormGetCollection ($oIE,0) $oText = _IEFormElementGetObjByName ($oForm, "button") _IEAction($oText,"click") I'm thinking that would work better?? Not sure though. THis wont work either because button is not recognized as a name in this case.. actually there is another line of code for reset..which i did not add in my example above..we have two button here.. <table align="center"> <tr> <td width="150" valign="top" nowrap > <div id="leftLayer" class="leftLayer"> <div class="buttonTitles">For the Page</div> <div class="button"><div class="back"><a class="button" href="java script:submitForm('AddItem')">Submit</a></div></div> <div class="button"><div class="back"><a class="button" href="java script:document.forms[0].reset();">Reset</a></div></div> </td>
magnifier512 Posted April 6, 2008 Posted April 6, 2008 something like this worked for me: $oForms = _IEFormGetCollection ($oIE,0) For $Form In $oForms If StringInStr($oForm, "Submit") Then _IEAction($oForm, "click") ExitLoop EndIf Next or maybe this: $oForms = _IEFormGetCollection ($oIE,0) For $Form In $oForms If StringInStr($oForm, "Button") Then _IEAction($oForm, "click") ExitLoop EndIf Next
Dipendra Posted April 6, 2008 Author Posted April 6, 2008 something like this worked for me: $oForms = _IEFormGetCollection ($oIE,0) For $Form In $oForms If StringInStr($oForm, "Submit") Then _IEAction($oForm, "click") ExitLoop EndIf Next or maybe this: $oForms = _IEFormGetCollection ($oIE,0) For $Form In $oForms If StringInStr($oForm, "Button") Then _IEAction($oForm, "click") ExitLoop EndIf Next Nope buddy... this does not work for me..
Dipendra Posted April 6, 2008 Author Posted April 6, 2008 Nope buddy... this does not work for me.. Check this page .. http://archivist.incutio.com/viewlist/css-discuss/49553 This is the kind of button i am having trouble clicking to []
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now