Queener Posted February 19, 2014 Share Posted February 19, 2014 <input id="rgList_ctl00_ctl02_ctl00_btnExport" type="image" align="absmiddle" style="height:15px;width:15px;border-width:0px;" src="../../IMAGES/Excel-16.gif" title="Export to Excel" name="rgList$ctl00$ctl02$ctl00$btnExport"></input> I'm not sure how to click on this image. I did try to get image collection, but it doesn't populate on msgbox. But when I use this code; I see it's in here: $oIE2 = _IECreate($link, 0, 1, 1, 1) $colForms = _IEFormGetCollection($oIE2) ; get all forms For $oForm In $colForms ; loop over form collection ConsoleWrite("---- FORM " & $oForm.name & " --------------------" & @CRLF) $oFormElements = _IEFormElementGetCollection($oForm) ; get all elements For $oFormElement In $oFormElements ; loop over element collection If StringLower($oFormElement.tagName) == 'input' Then ; it is an input MsgBox(0, "",("> input." & $oFormElement.type & " " & $oFormElement.name & @CRLF)) _IEFormElementSetValue($oFormElement, "Found You", 0) ; set value of the field ElseIf StringLower($oFormElement.tagName) == 'textarea' Then ; it is a textarea MsgBox(0, "", ("> textarea " & $oFormElement.name & @CRLF)) _IEFormElementSetValue($oFormElement, "Found You", 0) ; set value of the field EndIf Next Next Populate a whole bunch of inputs and rgList_ctl00_ctl02_ctl00_btnExport was one in the list. Help is much appreciated. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Danp2 Posted February 19, 2014 Share Posted February 19, 2014 Have you tried _IEImgClick? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Queener Posted February 19, 2014 Author Share Posted February 19, 2014 yes I did... The thing is the collection doesn't even see the image itself. Only the input sees it. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Solution Danp2 Posted February 20, 2014 Solution Share Posted February 20, 2014 How about _IEFormImageClick? Fr33b0w 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Queener Posted February 20, 2014 Author Share Posted February 20, 2014 that worked....thanks Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
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