Sorry but I don't know of a means in Watir1.6.5 to tell which object
has focus,
Watir's Watir::Element class lacks "in_focus?" or "focus?" methods.

It has "focus" method to set the focus, but not a method to
verify if an element is in focus (e.g. browser.link(:how,
what).in_focus?)

Or which element currently has focus (e.g. browser.focused_on)

Would be great if Watir did, but no cigar.

This same issue came up a few weeks ago when someone was
trying to validate the tabbing order on a page. You can use AutoIt
to tab through the elements on the page, but there was no way to
validate
that a specific element was currently in focus, let alone which of the
elements
on the page has focus.

Perhaps someone else can assist?

Joe

On Jun 3, 4:26 pm, kashyap <[email protected]> wrote:
> Hi all,
>
> Is there a method in Watir to get the id/name of the current focused
> element in a webpage?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to