Sign in to follow this  
Followers 0
elmoi0010

Click on radio buttons ?

10 posts in this topic

Hello guys am triying to click this radio button

screenshot_29.png

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

Share this post


Link to post
Share on other sites



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"

Share this post


Link to post
Share on other sites

is not a form bro :S for that is why i am asking :C.

screenshot_30.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Check the source code of the webpage, is there <form> tag on it? Maybe something like <form id=blababla blabla> ?

Edited by michaelslamet

Share this post


Link to post
Share on other sites

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.!

screenshot_31.png

here is the source: http://voicemail.k7.net/signup/ if anyone is interested

Share this post


Link to post
Share on other sites

 

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 :thumbsup:

Share this post


Link to post
Share on other sites

Thank you, mikell. I've never know it could be done what way :thumbsup:

Thanks guys it works <3 thanks you very much

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 by mikell

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