elmoi0010 Posted January 18, 2014 Share Posted January 18, 2014 Hello guys am triying to click this radio button The third radio button , but i just can click it by value. i tried to click it by: _IEFormElementRadioSelect But its not working i dont know.. Sorry for my noobs questions but i really dont know ;S. thanks in advanced to all Link to comment Share on other sites More sharing options...
michaelslamet Posted January 19, 2014 Share Posted January 19, 2014 You need to know the form name, and then do something like this: $oForm = _IEFormGetObjByName($oIE, "name_of_the_form") _IEFormElementRadioSelect($oForm, "0", "optDelivery", 1, "byValue", 1) One of the easiest and quickest way to know the form name is right click on the element in FireFox and choose "Inspect Element" Link to comment Share on other sites More sharing options...
elmoi0010 Posted January 19, 2014 Author Share Posted January 19, 2014 is not a form bro :S for that is why i am asking :C. Link to comment Share on other sites More sharing options...
michaelslamet Posted January 19, 2014 Share Posted January 19, 2014 (edited) Check the source code of the webpage, is there <form> tag on it? Maybe something like <form id=blababla blabla> ? Edited January 19, 2014 by michaelslamet Link to comment Share on other sites More sharing options...
elmoi0010 Posted January 19, 2014 Author Share Posted January 19, 2014 Check the source code of the webpage, is there <form> tag on it? Maybe something like <form id=blababla blabla> ? like this right ? but the form is closed after the radio button e.e.! here is the source: http://voicemail.k7.net/signup/ if anyone is interested Link to comment Share on other sites More sharing options...
michaelslamet Posted January 19, 2014 Share Posted January 19, 2014 Try this: #Include <ie.au3> $oIE = _IECreate ("http://voicemail.k7.net/signup/") _IELoadWait($oIE) $oLinks = _IETagNameGetCollection($oIE, "input") for $oLink in $oLinks if string($oLink.type) = "radio" and string($oLink.value) = "0" Then _IEAction($oLink, "click") ExitLoop EndIf Next Link to comment Share on other sites More sharing options...
mikell Posted January 19, 2014 Share Posted January 19, 2014 (edited) Or this Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.type == "radio" and $oInput.value == "0" Then $oInput.checked = true Next Edited January 19, 2014 by mikell michaelslamet 1 Link to comment Share on other sites More sharing options...
Solution michaelslamet Posted January 19, 2014 Solution Share Posted January 19, 2014 Or this Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.type == "radio" and $oInput.value == "0" Then $oInput.checked = true Next Thank you, mikell. I've never know it could be done what way Link to comment Share on other sites More sharing options...
elmoi0010 Posted January 19, 2014 Author Share Posted January 19, 2014 Thank you, mikell. I've never know it could be done what way Thanks guys it works <3 thanks you very much Link to comment Share on other sites More sharing options...
mikell Posted January 19, 2014 Share Posted January 19, 2014 (edited) OK, on the page there are several radio buttons with value = "0" so it can be done this way If $oInput.name == "optDelivery" and $oInput.value == "0" Then $oInput.checked = true unless you want all the radio buttons with value = "0" of the page being checked together Edited January 19, 2014 by mikell Link to comment Share on other sites More sharing options...
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