Support Requests item #2211968, was opened at 2008-11-01 04:04
Message generated for change (Comment added) made by jevonwright
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497983&aid=2211968&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: Install Problem (example)
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Kiran Nellikondi (kirannellikondi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Not able to retrieve form from document.write
Initial Comment:
How to get the form from the following code snippet. The code is using
document.write. Is there a way to retrieve the form and set the parameters and
submit.
The jsp code snippet:
<table width='1000px' height="37%" align="center">
<tr>
<td><script>
if (!BrowserPass()) {
document.write("<div align='left' class='loginNormal'
id='divUnsupportedBrowserArea'>");
document.write("The Chordiant Unified Desktop does not support the
browser you are using. Please use a supported browser to access this page.");
document.write("</div>");
}
else {
//write error message
document.write("<div align='center' class='loginNormal'
id='divMessageArea'>");
document.write("");
document.write("</div>");
//write logout message
document.write("<div align='center' class='loginNormal'
id='divLogoutMessageArea'>");
document.write("");
document.write("</div>");
document.write("<br/>");
document.write("<form onkeypress='keyPress()' id='formSubmit'
action='/Advisor/servlet/RequestHandler' method='POST'>");
document.write(" <input type='hidden' name='ActionID'
value='doLogin'/>");
document.write(" <input type='hidden' name='ReqMapParamATTR1'
value='LoginMessage.MessageName.EQ.LoginMessage'/>");
document.write(" <input type='hidden' name='Login' value='Login'
id='Login'/>");
document.write(" <table align='center' border='0' cellspacing='0'
cellpadding='3'>");
document.write(" <tr>");
document.write(" <td class='loginNormal'>User name</td>");
document.write(" <td ><input type='text' name='loginUserName'
size='30' tabIndex='1' class='loginNormal' ></td>");
document.write(" </tr>");
document.write(" <tr>");
document.write(" <td class='loginNormal'>Password</td>");
document.write(" <td ><input type='password'
name='loginUserPSWD' size='30' tabIndex='2' class='loginNormal' ></td>");
document.write(" </tr>");
document.write(" <tr valign='middle' height='24'>");
document.write(" <td colspan=2 align='right' >");
document.write(" <a href='Javascript:BrowserDetailsVisible()'
class='loginLink' tabIndex='3' title='Check Browser Configuration'>");
document.write(" <img border='0' align='middle'
src='/Advisor/iAdvisorWeb/images/icoValidate24.gif' >");
document.write(" </img>");
document.write(" Check Browser");
document.write(" </a>");
document.write(" <a href='Javascript:doFormSubmit()'
name='submitButton' class='loginLink' tabIndex='4'
onblur='Javascript:setFocus()' title='Login to the Chordiant Unified
Desktop'>");
document.write(" <img border='0' align='middle' type='image'
src='/Advisor/iAdvisorWeb/images/icoNext24.gif'>");
document.write(" </img>");
document.write(" Login");
document.write(" </a>");
document.write(" </td>");
document.write(" </tr>");
document.write(" </table>");
document.write("</form>");
document.write("<div id='divBrowserControls' style='display:none;'>");
document.write("</div>");
}
</script></td>
</tr>
</table>
----------------------------------------------------------------------
Comment By: Jevon Wright (jevonwright)
Date: 2008-11-01 14:41
Message:
Hi, this is the wrong place to ask usage questions - try joining the
JWebUnit-users mailing list and asking your question there.
Please look at the getting started guide
(http://jwebunit.sourceforge.net/quickstart.html). You should be able to
test for the existence of a form through assertFormExists(form name).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497983&aid=2211968&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