nofile 0 Posted July 12, 2010 (edited) first of all, i am sorry for my poor englishmy question is:One form includ two <input> bottons with the same "name" or "id",but how to click one button?i try to use $oSubmit = _IEFrameGetObjByName($oFrameRightin, "send")_IEAction($oSubmit,"click")or$colInputs = _IETagNameGetCollection($oFrameRightin, "input") For $oSubmit in $colInputs If String($oSubmit.value) = "send" Then _IEAction($oSubmit, "click") EndIfNext but failed,i hope somebody can help me,thank you very much Edited July 12, 2010 by nofile Share this post Link to post Share on other sites
nofile 0 Posted July 13, 2010 who can help me?i am wating all the time, thank you very much Share this post Link to post Share on other sites
Juvigy 49 Posted July 13, 2010 Post the html code for the 2 buttons.Which one do you want to click - the first one or the second one? Share this post Link to post Share on other sites
nofile 0 Posted July 13, 2010 Post the html code for the 2 buttons.Which one do you want to click - the first one or the second one?Thanks for your response,clik any one of them is ok.the form contains two <div> with the same code: <div class="setToolbar setToolbarBtm"> <input type="button" onclick="sendsmt('send.y');" onmouseout="this.className='Btn BtnPos ImgBtn'" onmouseover="this.className='Btn BtnHV ImgBtn'" value="send" class="Btn BtnPos ImgBtn" name="send"><input type="button" onclick="SetFavOrg();sendsmt('save');" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="save" class="Btn BtnPos" name="savetodraft"><input type="button" onclick="sendsmt('sendaddr')" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="adress" class="Btn BtnPos" name="sendaddr"><input type="button" onclick="document.location='/coremail/fcg/ldapapp?funcid=foldmain&sid=PAmTPRFyhSRAyAWw'" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="cancel" class="Btn BtnPos"><img width="1" height="1" src="http://tom.allyes.com/main/adfshow?user=Tom.com|mms|mms_5&db=tom"> </div> Share this post Link to post Share on other sites
nofile 0 Posted July 13, 2010 the botton i wanted to click is: <input type="button" onclick="sendsmt('send.y');" onmouseout="this.className='Btn BtnPos ImgBtn'" onmouseover="this.className='Btn BtnHV ImgBtn'" value="send" class="Btn BtnPos ImgBtn" name="send"> Share this post Link to post Share on other sites
Juvigy 49 Posted July 13, 2010 Try : $oIE = _IEAttach($link, "url") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.name = "Send" And $element.value = "Send" Then _IEAction($element, "click") Exitloop Endif Next Share this post Link to post Share on other sites
nofile 0 Posted July 13, 2010 Try : $oIE = _IEAttach($link, "url") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.name = "Send" And $element.value = "Send" Then _IEAction($element, "click") Exitloop Endif Next is ok!thanks Share this post Link to post Share on other sites