Forum: Ruby check a checkbox

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E6fd5314e74591a0b4f26e58aca5cb91?d=identicon&s=25 Erika (Guest)
on 2008-11-12 09:47
(Received via mailing list)
Hi,

How can I check if a check box is checked in Ruby Watir?

The following line only sets the checkbox:
ie.checkbox(:name,"Test1").set

Thanks,
Erika
E6fd5314e74591a0b4f26e58aca5cb91?d=identicon&s=25 Erika (Guest)
on 2008-11-12 10:14
(Received via mailing list)
I resolved it by using:
ie.checkbox(:name,"Test1").clear, because this was what I wanted to
achieve.

But if anyone knows how can be checked, if it is set or not the check
box please post :)

Thanks,
Erika




________________________________
From: Erika <geagneske83@yahoo.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Wednesday, November 12, 2008 10:43:53 AM
Subject: check a checkbox

Hi,

How can I check if a check box is checked in Ruby Watir?

The following line only sets the checkbox:
ie.checkbox(:name,"Test1").set

Thanks,
Erika
D7908f05c89e965f6bc5308ad6f41256?d=identicon&s=25 Siep Korteling (steenslag)
on 2008-11-12 13:16
Erika wrote:
> I resolved it by using:
> ie.checkbox(:name,"Test1").clear, because this was what I wanted to
> achieve.
>
> But if anyone knows how can be checked, if it is set or not the check
> box please post :)
>
> Thanks,
> Erika
>
>
>
>
> ________________________________
> From: Erika <geagneske83@yahoo.com>
> To: ruby-talk ML <ruby-talk@ruby-lang.org>
> Sent: Wednesday, November 12, 2008 10:43:53 AM
> Subject: check a checkbox
>
> Hi,
>
> How can I check if a check box is checked in Ruby Watir?
>
> The following line only sets the checkbox:
> ie.checkbox(:name,"Test1").set
>
> Thanks,
> Erika

puts ie.checkbox(:name,"Test1").checked?

hth,

Siep
361b85ceee205dfcb09d4c826f8f8f83?d=identicon&s=25 Ramesh Yatam (rameshyatam)
on 2011-01-25 15:39
I have tired usign this but still not working, can anyone help me on
this.

puts ie.checkbox(:name,"Test1").checked?

But if anyone knows how can be checked, if it is set or not the check
> box please post :)

thanks
Ramesh Y
This topic is locked and can not be replied to.