You can pull watir/Waiter.rb from svn and use it with your current version, download it into the watir directory alongside the winclicker.rb file: http://svn.openqa.org/svn/watir/trunk/watir/watir/waiter.rb
wait until some particular control is accessible before using it. Such as: require 'watir/waiter' include Watir waiter = Waiter.new [EMAIL PROTECTED](:name, 'myButton').exists?} -Charley On 9/14/06, Jason Alexander <[EMAIL PROTECTED]> wrote: > > > > > Doing some Googling, it appears that this has to do with the page still > loading? Which makes sense, I have a few elements that are causing the page > to "postback" (mechanism in ASP.NET). > > > > Assuming that's the problem, what's the best solution in most cases? I saw > where there was some talk of a wait_until in Jira, but what can I do > meanwhile? > > > > > > > Thanks, > > -Jason > > > > ________________________________ > > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Jason Alexander > Sent: Thursday, September 14, 2006 11:15 AM > To: [email protected] > Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method > > > > > Hey all, > > > > > > I'm running Ruby 1.8.5, and Watir 1.4.1 on Windows XP Pro SP2, with IE 7 > RC1. > > > > I have a test case that runs, and for some reason I get the following > exception: > > > > 2) Error: > > test_step_two_confirm(HCS_errors_test): > > WIN32OLERuntimeError: unknown property or method `innerText' > > HRESULT error code:0x80070005 > > Access is denied. > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2180:in > `method_missing' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2180:in `text' > > > C:/Projects/HostedCS/unittests/../unittests/hcs_errors_test.rb:111:in > `test_step_two_confirm' > > > > I'm not sure what's causing this actually. I don't think I'm doing anything > out of the ordinary. Here's that particular test: > > > > def test_step_two_confirm > > $ie.link(:text, "Get Started Now...").click > > > > $ie.button(:id, "ctl00_CenterWell_btnSubmit").click > > > > # First, make sure we still get our base errors. > > divTwo = $ie.div(:id, "stepTwoError") > > assert(divTwo.text["You must enter a valid subdomain for your > community."] != nil) > > assert(divTwo.text["Invalid subdomain. Domains may only contain > letters, numbers or hyphens."] != nil) > > > > # Now, let's set an invalid domain name (the first error should go > away, but not the second) > > $ie.text_field(:id, > "ctl00_CenterWell_txtDomainName").set("telligentrocks!") > > > > $ie.button(:id, "ctl00_CenterWell_btnSubmit").click > > > > assert(divTwo.text["You must enter a valid subdomain for your > community."] == nil) > > assert(divTwo.text["Invalid subdomain. Domains may only contain > letters, numbers or hyphens."] != nil) > > > > # Finally, let's enter a valid domain and make sure all errors go > away > > $ie.text_field(:id, > "ctl00_CenterWell_txtDomainName").set("testdomain") > > > > $ie.button(:id, "ctl00_CenterWell_btnSubmit").click > > > > assert(divTwo.text["You must enter a valid subdomain for your > community."] == nil) > > assert(divTwo.text["Invalid subdomain. Domains may only contain > letters, numbers or hyphens."] == nil) > > > > end > > > > Any ideas? I'm no Watir guru, so I'm not sure if this is a normal error you > run into and just means something else, basically. > > > > TIA! > > > > > > Thanks, > > -Jason > > > > > > _______________________________________________ > Wtr-general mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
