Sign in to follow this  
Followers 0
noobest

_IEFormImageClick issue

5 posts in this topic

Hi guys!

I'm having an issue with using _IEFormImageClick

The site i'm using it on, does not work with functions such as _IEFormImageClick, _IEFormSubmit & _IEImgClick

The alternative for _IEFormSubmit that i use is the

_IEAction ($oIE, "Click")

For _IEImgClick, i found this alternative:

$colIMG = _IEImgGetCollection($oIE)
For $i=1 To $Research[0]
    For $oIMG in $colIMG
        If StringinStr(String($oIMG.src),"Source.gif") Then
            ConsoleWrite(String($oIMG.title)&@CRLF)
            If StringInStr(String($oIMG.title),$Research[$i]) Then
                _IEAction($oIMG, "click")
            EndIf
        EndIf
    Next
Next

However, i haven't found an alternative for the _IEFormImageClick as this object behaves differently

Is anyone able to help me with this?

The FormImage that i'm trying to click on is found in

<DIV class=icone_ponte><INPUT style="WIDTH: 50px; HEIGHT: 50px" title="Awesomeness" alt="Awesomeness" src="http://Awesomeness/Source.gif" type=image></DIV>

Thanks in advance and for your time!

Share this post


Link to post
Share on other sites



Have you tried

$colIMG = _IEImgGetCollection($oIE)

For $i=1 To $Research[0]    

For $oIMG in $colIMG        

If StringinStr(String($oIMG.src),"Source.gif") Then             ConsoleWrite(String($oIMG.title)&@CRLF)            

If StringInStr(String($oIMG.title),$Research[$i]) Then                

$oIMG.click()        

EndIf        

EndIf    

Next

Next

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yes, i've tried that.

The FormImage doesn't get added into the collection with _IEImgGetCollection

$colIMG = _IEImgGetCollection($oIE) 
For $oIMG in $colIMG         
ConsoleWrite(String($oIMG.title)&@CRLF)
ConsoleWrite(String($oIMG.name)&@CRLF)

ConsoleWrite(String($oIMG.src)&@CRLF)  Next

This doesn't even show the FormImage anywhere in console (it shows a lot of info of other images but not the FormImage i'm trying to access)

 

I have just found a way to talk the FormImage without _IEFormImageClick

But i'm unable to click onto it

Anyone able to figure out what's wrong with this code? Everything seems to work until i try to click on it. It seems to click on something (page refreshes) but didn't seem to click on the correct object.

$colTag = _IETagNameGetCollection($oIE,"input")
For $oTag in $colTag
    If StringInStr(String($oTag.src),"Source.gif") Then
        ConsoleWrite(String($oTag.title&" "&$oTag.name&" "&$oTag.id&" "&$oTag.src)&@CRLF)
        _IEAction($oTag,"click")
        _IELoadWait($oIE,8000)
        ExitLoop
    EndIf
Next
ConsoleWrite("End"&@CRLF)
Edited by noobest

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

That also doesn't work since it's not a link.

I did find a way to get it working in the meantime

$colTag = _IETagNameGetCollection($oIE,"input")
For $oTag in $colTag
    If StringInStr(String($oTag.src),"Source.gif") Then
        ConsoleWrite(String($oTag.title & " " & $oTag.name & " " & $oTag.id & " " & $oTag.src) & @CRLF)
        $oTag.click()
        _IELoadWait($oIE,8000)
        ExitLoop
    EndIf
Next
ConsoleWrite("End" & @CRLF)

Apparently, it works if i use $oTag.click() instead of _IEAction($oTag,"click")

Thanks for helping me brainstorm guys!

Edited by noobest

Share this post


Link to post
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
Sign in to follow this  
Followers 0