TAMIRI Posted March 21, 2018 Posted March 21, 2018 Hello, i was wondering how can i click a button if that button is the ONLY one in source example <td><button onclick="do_calc()">Do Calc!</button></td> this is my code, but i am using this if there are more than 1 button in a source Local $oButtons = _IETagNameGetCollection($oIE, "button") For $oButton In $oButtons If $oButton.innerText = "Do Calc!" Then _IEAction($oButton, "click") EndIf Next thanks in advance
Danp2 Posted March 21, 2018 Posted March 21, 2018 $oButton = _IETagNameGetCollection($oIE, "button", 0) _IEAction($oButton, 'click') TAMIRI 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
TAMIRI Posted March 21, 2018 Author Posted March 21, 2018 16 minutes ago, Danp2 said: $oButton = _IETagNameGetCollection($oIE, "button", 0) _IEAction($oButton, 'click') thank you @Danp2 i didnt think of the $iIndex wonderful
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