How to get value of check box

Hi all,
I am working on a project to Automation Testing with WATIR. I am quite
new to Ruby and Watir. I need to check if the check box on the page I am
testing is checked or unchecked. But unable to work that out

Please Respond

Thanks & Regards,
Manav G.

Manav,

There is a default method called "checked?"to check the checkbox is
checked or not in your page.

browser.checkbox(:name,“any_given_name”).checked?

You can use this.

Cheers,
vaddi.

vadivelan vaddi wrote in post #1027744:

Manav,

There is a default method called "checked?"to check the checkbox is
checked or not in your page.

browser.checkbox(:name,“any_given_name”).checked?

You can use this.

Cheers,
vaddi.

Thanks Vaddi for your reply. That will be very useful to me.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs