Created
July 25, 2011 14:27
-
-
Save bramhaghosh/1104236 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ def checkbox(name, identifier) define_method("#{name}") do send("#{name}_rendered?") browser.checkbox(identifier) end define_method("check_#{name}") do send("#{name}_rendered?") times_retried = 0 begin browser.checkbox(identifier).set rescue WIN32OLERuntimeError, Watir::Exception::ObjectDisabledException, Watir::Exception::NoValueFoundException, Watir::Exception::UnknownObjectException => exception raise exception if times_retried >= 5 sleep 1 times_retried += 1 retry end end define_method("unchec