Hello Joe, It is actually doesnt work. The condition is not working, it is still going through all the radio buttons.
On Jul 2, 1:51 am, Shlomit Gazit <[email protected]> wrote: > Thank you! that's working. > > On Jul 1, 5:39 am, joedio <[email protected]> wrote: > > > > > Shlomit, > > > This may work for your situation: > > > # Define the element ID to be acted upon > > myID = "your_id" > > > # Loop through the radio elements > > browser.radios.each do | radio | > > > # Separate the matching radios > > if(browser.radio(:id, myID )) > > # Do whatever you need to do with it (e.g. set it) > > browser.radio(:id, myID ).set > > end > > > end # End of Loop > > > Hope that helps, > > Joe > > > On Jul 1, 5:08 am, Shlomit Gazit <[email protected]> wrote: > > > > I am trying to iterate through radio buttons in the page, but I dont > > > want to iterate through all the radios in the page, only those with > > > certain id. > > > How can I do that? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected] To unsubscribe: [email protected]
