that depends on what is selected in an early step. this list is random generated from a database. In this case i search for the text 'EW, Exacte Wetenschappen' and when i found it i like to select is. In the script below i can find the text 'EW, Exacte Wetenschappen' but when i say 'li.checkbox.set' then the checkbox with the text 'FB, Facilitair Bedrijf' will be checked.
On Thursday, September 27, 2012 11:56:51 AM UTC+2, CrazyFrog wrote: > > When i search for a checkbox and click on it, it always click the checkbox > below the checkbox i find > > lists = $browser.element(:id => checkboxgroup).to_subtype.lis > lists.each do |li| > chckbx = li.text > if chckbx.strip == "check box to find" > li.checkbox.set > break > end > end > > for example: i have 6 checkboxes and i search for the 3 checkbox. When i > found that checkbox and set this checbox then checkbox 4 is check > and i want to click checkbox 3. > > Can anybody help me to explain what i do wrong?? > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
