Bugs item #1637846, was opened at 2007-01-17 17:18
Message generated for change (Settings changed) made by henryju
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1637846&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: Core API
Group: Release 1.4
>Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Peter Becker (peterbecker)
Assigned to: Julien HENRY (henryju)
Summary: clickElementByXPath does not advance page
Initial Comment:
I used WebTester.clickElementByXPath(String) to click on a submit button of a
login screen but it did not work. Stepping into the code showed that HTMLUnit
does the right thing and returns the new page on ClickableElement.click(), but
this return value is ignored by JWebUnit.
Here is the HTML of the button:
<input type="submit" name="login_button"
value="Login" style="<<omitted>>" />
Here is my test step:
clickElementByXPath("//[EMAIL PROTECTED]'submit' and @name='login_button']");
Of course having a way to do this without XPath would be nice, too -- but I
couldn't find any that didn't involve a change to the webapp.
----------------------------------------------------------------------
Comment By: Julien HENRY (henryju)
Date: 2007-03-03 19:15
Message:
Logged In: YES
user_id=1235926
Originator: NO
This should works.
We don't need to store HtmlPage returned by ClickableElement.click(),
because we can get it thanks to WebWindows.getEnclosedPage().
BTW, why are you not using submit("login_button") ?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1637846&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