For some of the more 'standard' style attributes I've also been able
to get at them similar to this

puts ie.div(:id, 'search').style.visibility


Aaron, if the style is not specified in the basic HTML for the page,
then it's likely coming from a resource such as a .CSS file, or could
be set/altered by javascript executing on the client side.

On Jul 27, 7:48 am, Charley Baker <charley.ba...@gmail.com> wrote:
> You should be able to access it like this:
>
> ie.div(:id, 'search').document.currentStyle.invoke('display')
>
> Charley Baker
> blog:http://blog.charleybaker.org/
> Lead Developer, Watir,http://wtr.rubyforge.org
> QA Architect, Gap Inc Direct
>
> On Mon, Jul 27, 2009 at 8:44 AM, Aaron MacDonald <aa...@genieknows.com>wrote:
>
>
>
>
>
> > I have an element with a style attribute I need to access, like this:
>
> > <div id="search" class="absolute hide" style="display: block;">
> > ...
> > </div>
>
> > Note that I am only able to see the style attribute using Firebug; it
> > doesn't show up when I view the page source.  Is it possible though to
> > examine the style attribute through Watir?- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to