On 15 July 2011 20:42, Chad W. <[email protected]> wrote:
> Hello,
>
> I'm new to all of this. I have a script that behaves rather erratically.
>
> I'm getting the following error...
>
>  1) Error:
> test_capital_by_division(SampleTest):
> NoMethodError: undefined method `innerText' for nil:NilClass

Note the wording above carefully.

>    
> X:/SOM/Admin/Finance/Reporting/Cognos/QA/scripts/DEV/working/CAPTEST.rb:71:i
> n `test_capital_by_division'
>
> This refers to the following line in my code:
>
> assert_equal("$977,352" ,
> @b.element_by_xpath("//form/table/tbody/tr[3]/td/div/div/table/tbody/tr[2]/td/div/div/div/table/tbody/tr[165]/td[2]/span[1]").innerText

The error is saying that you tried to call nil.innerText.  That means
that your call to element_by_xpath returned nil.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to