Here's what I added to my user-extensions.js to remedy this ....


Selenium.prototype.doUncheck = function(locator) {

    var element = this.page().findElement(locator);
   
    element.checked = false;
   
};


Selenium.prototype.doCheck = function(locator) {

    var element = this.page().findElement(locator);
   
    element.checked = true;
   
};


Scott Fitchet wrote:
I'm new to Selenium and am really enjoying the simplicity and openness of the API.

One thing I have to been able to figure out yet is how to "check" or "uncheck" a box instead of "clicking".

In this case my checkboxes are in a "checkbox" group ... (which I normally avoid but I didn't write this app) ... so I have to use the DOM like this to get at the extra boxes ...  document.myform.mycheckbox[ i ]

I can't assume that a particular checkbox will the enabled by default.

Cheers ...

Scott

( would love to see the TestRunner show up in something like Konfabulator )

--

 

 

Scott Fitchet
Compliance Week
www.complianceweek.com
(888) 519-9200

_______________________________________________ Selenium-devel mailing list Selenium-devel@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel


--

 

 

Scott Fitchet
Compliance Week
www.complianceweek.com
(888) 519-9200


_______________________________________________
Selenium-devel mailing list
Selenium-devel@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel

Reply via email to