Hi,

You could use getComputedStyle.

This is similar to currentstyle in IE.

Here is a function that is similar to the ie's element.visible
function which uses getComputedStyle to get the current visibility
style-
def visible?
    assert_exists
    jssh_command = "var val = 'true'; var str = ''; var obj = #
{element_object}; while (obj != null) { try { str =
document.defaultView.getComputedStyle(obj,null).visibility; if
(str=='hidden') { val = 'false'; break; } str = #
{DOCUMENT_VAR}.defaultView.getComputedStyle(obj,null).display; if
(str=='none') { val = 'false'; break; }  } catch(err) {} obj =
obj.parentNode; } val;"
    jssh_socket.send("#{jssh_command}\n", 0)
    vals = read_socket()
    return (vals == 'false')? false: true
  end

Thanks,
Paul


--~--~---------~--~----~------------~-------~--~----~
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