Arclite86 1 Posted September 22, 2014 I need to select a radiobutton in IE I know the FF function for this but I could not find the IE version This is the code: <form id="switch_primary_form" action="switch_primary" class="bigradioform" method="post"> <input class="bigradio" type="radio" name="account" value="2807567304"> @dr_virgil<br> <input class="bigradio" type="radio" name="account" value="2807648726"> @DrRobertSHa<br> <input class="bigradio" type="radio" name="account" value="2807655493"> @DrSolomonJH1<br> <input class="bigradio" type="radio" name="account" value="2807692422"> @DrClydeNVar<br> <input class="bigradio" type="radio" name="account" value="2807698267"> @DrDennisPCo1<br> <input class="bigradio" type="radio" name="account" value="2807710981"> @DrGregoryBM<br> <input class="bigradio" type="radio" name="account" value="2807752754"> @DrRobertMPh<br> <input class="bigradio" type="radio" name="account" value="2807772110"> @DrSeanRSmit<br> <input class="bigradio" type="radio" name="account" value="2807891370"> @Drrudy_silv<br> <input class="bigradio" type="radio" name="account" value="2807969299"> @DrJohnnyKTr<br> <input class="bigradio" type="radio" name="account" value="2807974142"> @DrChristopher3<br> <input class="bigradio" type="radio" name="account" value="2807974627"> @dr_bullard<br> <input class="bigradio" type="radio" name="account" value="2807987911"> @DrBryanEBul<br> <input class="bigradio" type="radio" name="account" value="2807999401" checked="checked"> <strong>@DrMichealSP (Current Primary) </strong><br> <br><br> <a class="btn btn_smaller btn_gray inline_block" href="/account/manage_owned">« Cancel</a> <a href="#" class="btn btn_smaller btn_blue inline_block btn_submit_form">Confirm »</a> </form> I know this is the working code for FF: _FFFormRadioButton("account", Number($i),"name","switch_primary_form", "id") Share this post Link to post Share on other sites
Danp2 878 Posted September 22, 2014 _IEFormElementRadioSelect [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
Arclite86 1 Posted September 22, 2014 thank you, I have tried this. Local $oForm = _IEGetObjById($oIE, "switch_primary_form") _IEFormelementRadioSelect($oForm,"bigradio","account",0,5,"byValue") please correct me what im doing wrong Share this post Link to post Share on other sites
MikahS 92 Posted September 22, 2014 _IEFormElementRadioSelect($oForm, "bigradio", "account", Default, Default, Default) ; added default values to the last 3 parameters to show that you could just use the first 3 parameters without specifying the others. Snips & ScriptsMy Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4Feel free to use any of my code for your own use. Forum FAQ Share this post Link to post Share on other sites
Arclite86 1 Posted September 22, 2014 even If I use this code you showed me I stil get an error I have tried to select the one of the 15 Radiobuttons by typing 5 (radiobotton 5)in one of the places you marked as "Default" to select the fifth radiobutton just like the in the FF version so it will fit good in the rest of my script but that didnt work, And I dont know if that is possible?, because I have a allot of radiobuttons forms like this so I use a loop for it so it is unpossible to call the radio button by name or value nummer. Share this post Link to post Share on other sites
MikahS 92 Posted September 22, 2014 Give this a try _IEFormElementRadioSelect($oForm, "2807698267", "account", 1, "byValue", 1) Snips & ScriptsMy Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4Feel free to use any of my code for your own use. Forum FAQ Share this post Link to post Share on other sites
Danp2 878 Posted September 22, 2014 You need to review the help file and the examples because you are not passing the the correct parameters. Hint: $sString Value used to match element - treatment based on $sMode [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
Arclite86 1 Posted September 22, 2014 Give this a try thank you, It will propably work but I use this function in a loop and the $sString: 2807698267 will only count for one time I really need something that will work for loop after loop just as in the FF function: _FFFormRadioButton("account", Number($i),"name","switch_primary_form", "id") Number($i) will read a input that gives a number from 0 to 15 it will go like 1,2,3,4,5...etc so every radio button gets a turn but I dont know if that is possible in this function? Share this post Link to post Share on other sites
mikell 1,007 Posted September 22, 2014 ? Local $oForm = _IEFormGetObjByName($oIE, "switch_primary_form") For $i = 0 To 15 _IEFormElementRadioSelect($oForm, $i, "account", 1, "byIndex") Next Share this post Link to post Share on other sites
Arclite86 1 Posted September 22, 2014 ? Local $oForm = _IEFormGetObjByName($oIE, "switch_primary_form") For $i = 0 To 15 _IEFormElementRadioSelect($oForm, $i, "account", 1, "byIndex") Next Thank you very much this is actually what I meant Local $oForm = _IEFormGetObjByName($oIE, "switch_primary_form") $i = GUICtrlRead ($listcounter2) _IEFormElementRadioSelect($oForm, Number($i), "account", 1, "byIndex") Thank you very much now I can continue creating my script Share this post Link to post Share on other sites