Jump to content

Radio button selection help


Recommended Posts

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

here is the code:

<tr height="25">
     <th width="88" align="center" class="body"><div align="left"><strong>DLNA Server&gt;</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">&nbsp;</th>
   </tr>

note: both radio buttons have same name "dlna_enabled"

Link to comment
Share on other sites

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...