lifesuxs Posted June 16, 2012 Share Posted June 16, 2012 Hi all, I am using Autoit for the automation of a webpage. I am doing this on IE. On the webpage there are 2 radio buttons with name "Enabled" and "Disabled". I just want check that which radio button is selected i.e. either Enabled or Disabled, and that should get logged into a notepad file.How could I do it??? please suggest. Link to comment Share on other sites More sharing options...
blacksoul305 Posted June 16, 2012 Share Posted June 16, 2012 Can we have the URL? It will be easier to help you. Link to comment Share on other sites More sharing options...
lifesuxs Posted June 16, 2012 Author Share Posted June 16, 2012 Hello blacksoul305, acctually it is a wireless home router web interface. there is a feature for DLNA, on the page there are Enable/disable radio buttons for activateing and Deactivating the feature. Link to comment Share on other sites More sharing options...
blacksoul305 Posted June 16, 2012 Share Posted June 16, 2012 Okay, I use Chrome so it's the same for Chronium, right click on both radios and you may have "Inspect the element" option. Then, copy-paste the two codes here. Link to comment Share on other sites More sharing options...
lifesuxs Posted June 16, 2012 Author Share Posted June 16, 2012 here is the code: <tr height="25"> <th width="88" align="center" class="body"><div align="left"><strong>DLNA Server></strong></div> </th> <th width="193" align="center" class="body"><div align="left"> <input name="dlna_enabled" type="radio" value="1" checked> Enable <input name="dlna_enabled" type="radio" value="0" > Disable </div></th> <th width="315" align="center" class="body"> </th> </tr> note: both radio buttons have same name "dlna_enabled" Link to comment Share on other sites More sharing options...
blacksoul305 Posted June 16, 2012 Share Posted June 16, 2012 What is that? Same name but no ID. Well, at least we can see that when it is "disabled", value = 0 and value = 1 when its "enabled". No idea... Link to comment Share on other sites More sharing options...
lifesuxs Posted June 16, 2012 Author Share Posted June 16, 2012 I have tried this out using values of 0 and 1 but result is alway the first radio button i.e. Enabled no matter the feature is disabled at the moment. I used the function _IEFormElementGetValue. Do you have any idea what fuction could be used in order to get "checked" values as you could see this in code. Link to comment Share on other sites More sharing options...
blacksoul305 Posted June 16, 2012 Share Posted June 16, 2012 Well, I just need the ID of both radios, we were able to use _IEGetIdByName but they've got the same name. From IDs, we can make a condition thanks to _IEFormElementGetValue and then check which radio's checked. Not I'm stuck. Haha ! Link to comment Share on other sites More sharing options...
lifesuxs Posted June 16, 2012 Author Share Posted June 16, 2012 Thanks pal. Link to comment Share on other sites More sharing options...
DaleHohm Posted June 18, 2012 Share Posted June 18, 2012 Have you looked at _IEFormElementRadioSelect and its examples? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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