def get_active_Element()
  active_element = ""
  current = $ie.document.activeElement
  props = ['id','name','value']
  props.each do |prop|
    p = current.invoke(prop)
    if current.invoke(prop) != nil
      case current.invoke("type")  #Error Here
        when "text"
          active_element = $ie.text_field(prop.to_sym,current.invoke
(prop))
      end
      break
    end
  end
  return active_element
end

Goal,  I'm attempting at get the activeElement and displaying it.

I'm getting unknow property or method 'type'  HRESULT error code

It appears that there isn't a activeElement on the page or one that I
cannot invoke type.  If I put the focus on the text field this passes
with no issues.

How do I know what I can & can't invoke?

Thanks,








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