CaptainBeardsEyesBeard Posted July 30, 2019 Posted July 30, 2019 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
prodesigner Posted July 30, 2019 Posted July 30, 2019 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.
CaptainBeardsEyesBeard Posted July 30, 2019 Author Posted July 30, 2019 Worked a treat! You the bomb!
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