I am trying to test an html page with several forms, a couple of which have a select with the same name. I want to invoke a select on one of them.
something like..
<html>
<body>
<form name="mainCourse">
...
<select name="sauce">
<option>mustard</option>
<option>horseradish</option>
</select>
</form>
<form name="desert">
...
<select name="sauce">
<option>chocolate</option>
<option>strawberry</option>
</select>
</form>
</body>
</html>
I am calling
Webtester tester = ....
tester.setWorkingForm("desert"); //to set the form I want to check the select on, and then calling
tester.selectOption("sauce", "chocolate");
Stepping through in the debugger I found that within HtmlUnitDialog#hasFormSelected(String selectName); the method getFormWithSelect(String) is called. This resets the working form to be the first one with a select of that name on it. subsequent code fails as it is now dealing with the wrong select.
is there a way to interact with a specific form without the working form being reset?
TIA
Veenay
This email originates from Steria Limited, registered office: Three Cherry Trees Lane, Hemel Hempstead, Hertfordshire HP2 7AH; Registration Number 2706218; www.steria.co.uk. This email and any attachments may contain confidential information and may be subject to copyright or other intellectual property rights. It is only for the use of the addressee(s). You are prohibited from copying, forwarding, disclosing, saving or otherwise using it in any way if you are not the addressee(s) or responsible for delivery. If you receive this email by mistake, please advise the sender and cancel it immediately. Steria may monitor the content of emails within its network to ensure compliance with its policies and procedures. Any email is susceptible to alteration and its integrity cannot be assured. Steria shall not be liable if the message is altered, modified, falsified, or edited.
------------------------------------------------------------------------- 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-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
