Thanks Bret, it was me and not Watir. I was setting the elements class in javascript using setAttribute("class", "the value") rather than "className". So of course it didn't work.

I do think there is something hokey with div's though because trying to print 
out a div throws

NoMethodError: undefined method `style' for #<Watir::Div:0x2d7b660>
    c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2211:in 
`span_div_string_creator'
    c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2222:in `to_s'

It seems that you missed a reference to style when you were changing it to 
className.

Thanks for a great tool.


R.


Bret Pettichord wrote:
take a look at div_test.rb.

At 05:17 PM 8/8/2005, Rob Lally wrote:

Hi,

I notice that in the last release the style attribute was converted to class_name for div elements.

I'm trying to use it to get the css class of a div, but I can't seem to get it to work - it doesn't return anything. Is it just me or is it broken?
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to