Sign in to follow this  
Followers 0
Dryden

Selecting Radio Control ina a Web Page

6 posts in this topic

#1 ·  Posted (edited)

Hi guys! So this is my problem this time:

I have a page where I have to login and navigate to a specific address (that part is done), and then I have a page with Radio Type Controls, And I have to do this:

Posted Image

So basically I have to select the 1st radio and then click in that button, the problem is that I can't do it with pixel coordinates because I want it hidden (I just have it sowing right now, because I want to see it working). When I try to input the correct fields it just doesn't do anything, I think this is due to the fact that there are 9 tables in the page (it doesn't seem, but there are).

This is the part of the radio controls:

<tr>
              <tr><td><input name="tipohora" type="radio" value="1"></td><td align="left">&nbsp;Entrada&nbsp;&nbsp;&nbsp;</td>
              <td><input name="tipohora" type="radio" value="2"></td><td align="left">&nbsp;Saída/almoço&nbsp;&nbsp;&nbsp;</td>
              <td><input name="tipohora" type="radio" value="3"></td><td align="left">&nbsp;Entrada/almoço&nbsp;&nbsp;&nbsp;</td>
              <td><input name="tipohora" type="radio" value="4"></td><td align="left">&nbsp;Saída</td></tr><tr>
              <td><br><input name="tipohora" type="radio" value="5"></td><td align="left"><br>&nbsp;Pausa&nbsp;&nbsp;&nbsp;</td>
              <td><br><input name="tipohora" type="radio" value="6"></td><td align="left"><br>&nbsp;Fim da Pausa&nbsp;&nbsp;&nbsp;</td>
              <td><br><input id="toggle-img-1" name="tipohora" type="radio" value="7" onclick="toggle('toggle-img-1', 'extra-1');"></td><td align="left"><br>&nbsp;Hora extra entrada&nbsp;&nbsp;&nbsp;</td>
              <td><br><input id="toggle-img-1" name="tipohora" type="radio" value="8" onclick="toggle('toggle-img-1', 'extra-1');"></td><td align="left"><br>&nbsp;Hora extra Saída</td></tr>
              </tr>
Edited by Dryden

"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett.

Share this post


Link to post
Share on other sites



Take a look at the following functions in the help file.

  • _IECreate()
  • _IEFormGetCollection() or _IEFormGetObjByName()
  • _IEFormElementRadioSelect()

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Take a look at the following functions in the help file.

  • _IECreate()
  • _IEFormGetCollection() or _IEFormGetObjByName()
  • _IEFormElementRadioSelect()

I've seen all that, as I said the program has already some functions working... I found this to be very helpful:

http://www.autoitscript.com/forum/index.ph...ic=52918&hl

Thx! :D

Whith your help I was able to select the radio controls.

Now theres one more problem! How do I make it Click the Button?

Edited by Dryden

"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Please guys I just need this extra help! I have this source in the page (the button part):

<input type="submit" value="Hora Interna" name="normal">&nbsp;&nbsp;</p>

So to submit after selecting the radio value I shoul do this, right?

_IEFormElementGetObjByName ($oForm, "normal")
_IEFormSubmit ($oForm)

but it doesn't submit :S

this one doesn't sumbit either:

$oForm = _IEFormGetObjByName ($oIE, "normal")
_IEFormSubmit ($oForm)
Edited by Dryden

"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett.

Share this post


Link to post
Share on other sites

Please read the "Remarks" for the _IESubmit function in the helpfile.

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

It's workin' now! I got It... Simulate a click :D

Thx 4the tip.

Edited by Dryden

"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett.

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