Jump to content

Recommended Posts

Posted

hey

 

i'm trying to click a button in a div. I tried this but didn't work

Local $activeButtons= _IEGetObjById($oIE, "activeButtons-1070")
Sleep(5000)
_IELinkClickByText($oIE,"Send Email")

Local $oButtons = _IETagNameGetCollection($oIE, $activeButtons)
For $oButton In $oButtons
    ;~ Check if Button InnerText equals Log In and perform an action.
    ;~ Uncomment the _IEAction line below to submit the form.
    If $oButton.InnerText = 'Send Email' Then
        MsgBox(64, 'Send Email Button Found', 'Button found with value: ' & $oButton.InnerText, 4)
        _IEAction($oButton, 'click')
    EndIf
Next

The HTML looks like the attached pic
 

1.png

Posted

I am beginner but I can suggest this example:

$oButtons = _IETagnameGetCollection($oIE, "button")
For $oButton in $oButtons
    If String($oButton.value) = "your value" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next

Replace "button" with "input" and "your value" with "Send Email"

Try it.

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
  • Recently Browsing   0 members

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