Feature Requests item #1680549, was opened at 2007-03-15 00:18
Message generated for change (Settings changed) made by jevonwright
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1680549&group_id=61302
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HtmlUnit plugin
Group: Release 1.4
Status: Open
Priority: 5
Private: No
Submitted By: pkirby (pkirby)
>Assigned to: Jevon Wright (jevonwright)
Summary: moveFocusToElementByXPath
Initial Comment:
New method moveFocusToElementByXPath would enable setting the focus to the
specified element, as supported by the HtmlUnit method
WebClient.moveFocusToElement().
This would enable the testing of onfocus and onblur events.
Needs new method in HtmlUnitDialog, something like this:
public void moveFocusToElementByXPath(String xpath) {
HtmlElement e = getElementByXPath(xpath);
if (e == null)
throw new RuntimeException("No element found with xpath \"" + xpath + "\"");
try {
FocusableElement fe = (FocusableElement) e;
wc.moveFocusToElement(fe);
} catch (ClassCastException exp) {
throw new RuntimeException("Element with xpath \"" + xpath + "\" is not
focusable", exp);
} catch (IOException exp) {
throw new RuntimeException("Move focus failed", exp);
}
}
Also needs corresponding method on WebTestCase.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1680549&group_id=61302
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development