Feature Requests item #1680549, was opened at 2007-03-14 11:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Nobody/Anonymous (nobody)
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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development