Invincable Posted June 6, 2007 Share Posted June 6, 2007 I am having difficulties selecting a particular radio button on a website for a script I have been writing. I select various other radio buttons with no problems, however no matter what I try I cannot seem to select the first radio button. Can anyone please provide some incite into why this is not working. Here is a snippet of the html code I cannot select <html> <form name="formName" method="post" action="/test/results"> Please check the following radio button to continue<BR> <INPUT type=RADIO name="Layer1" value="abc" ><BR> OK<BR> </html> This is how I believe the _IEFormElementRadioSelect function is supposed to work. #include<IE.au3> $oIE = _IECreate(@ScriptDir & "\example2.html") $o_form = _IEFormGetObjByName ($oIE, "formName") _IEFormElementRadioSelect($o_form,"abc","Layer1",1,"byValue") Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 6, 2007 Moderators Share Posted June 6, 2007 This is a known bug, but you can work around it like this.#include <IE.au3> $oIE = _IECreate(@ScriptDir & "\example2.html") $oForm = _IEFormGetObjByName($oIE, "formName") $oRadio = _IEFormElementGetObjByName($oForm, "Layer1") If Not $oRadio.checked Then With $oRadio .checked = True .fireEvent ("onchange") .fireEvent ("onclick") EndWith EndIf Link to comment Share on other sites More sharing options...
Invincable Posted June 6, 2007 Author Share Posted June 6, 2007 Hey big_daddy thanks for this. I spent hours hitting my head against the wall because I could not figure this out. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 6, 2007 Moderators Share Posted June 6, 2007 Your welcome! 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