Jump to content

Click on IE input


Queener
 Share

Go to solution Solved by Danp2,

Recommended Posts

<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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...