[Wtr-general] WIN32OLERuntimeError: unknown property or method

Jason Alexander jalexander at telligent.com
Thu Sep 14 12:14:53 EDT 2006


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 
  
  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060914/0ddd6e51/attachment-0001.html 


More information about the Wtr-general mailing list