You were right. I disabled javascript to get around this issue: <option
name="JavaScriptEnabled" value="false" />
Now I've run into another problem I can't solve. It seems it's not able to
find the HTML input field in the form. I don't understand why? I've also
tried using "htmlId=uname"
Scott
Snippet from webtest script:
<setInputField description="set user name"
formName="loginForm"
name="u"
value="alerttest" />
HTML form:
<div class="loginBox">
<form action="servlet/login" method="post" id="loginForm" name="loginForm"
onsubmit="checkJS()">
<div class="field" style="padding-top: 10px;">
<label for="uname">Username</label><input type="text" name="u" size="20"
maxlength="10" id="uname"/>
</div>
<div class="field">
<label for="pwd">Password</label><input type="password" name="p"
value="" size="20" maxlength="32" id="pwd"/>
</div>
<div class="loginBtn">
<div>
<input id="loginButton" type="image" src="images/login-btn.gif"/>
</div>
<div style="margin: 8px 0 0 10px;"><ahref="signin/forgotPassword.do"
tabIndex="4">Forgot your password</a></div>
</div>
<input type="hidden" name="l" value="
<https://qalogin1.marketingsolutions.yahoo.com:443/adui/signin/processSignin
.do?JS_ENABLED=false>
https://qalogin1.marketingsolutions.yahoo.com:443/adui/signin/processSignin.
do?JS_ENABLED=false">
<input type="hidden" name="lf" value="
<https://qalogin1.marketingsolutions.yahoo.com:443/adui/signin/loadSignin.do
?JS_ENABLED=false>
https://qalogin1.marketingsolutions.yahoo.com:443/adui/signin/loadSignin.do?
JS_ENABLED=false">
<input type="hidden" name="JS_ENABLED" value="false" />
</form>
</div>
Output from script:
main:
BUILD FAILED
/home/sglaser/src/webtest/SimpleTest.xml:7: Canoo Webtest: R_1393.
Test failed.
Test step setInputField (/home/sglaser/src/webtest/SimpleTest.xml:25: )
named "set user name" failed with message "No suitable form found having
field named "u""
_____
From: John and Pip [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 18, 2007 1:06 PM
To: [EMAIL PROTECTED]; Scott Glaser
Cc: [EMAIL PROTECTED]
Subject: Re: [Webtest] How to decipher error output?
Hi Scott,
The first thing to do is check whether there is actually a javascript error
in your web site, which is what the message below means. e.g. in Firefox go
to Tools/Error Console
regards,
John
On 7/19/07, Scott Glaser <[EMAIL PROTECTED]> wrote:
While running the following webtest script I get the below error. Any ideas
why I'm getting the assertion failure for the invoke step indicated? Since
I'm new to webtest I don't know how to generate more informative output to
debug the problem.
Scott
<project name="SimpleTest" basedir="." default="main">
<property name="webtest.home" location="/home/sglaser/util/webtest-2.1" />
<import file="${webtest.home}/lib/taskdef.xml"/>
<target name="main">
<webtest name="myTest">
<config
protocol="https"
host="login11.marketingsolutions.yahoo.com"
port="443"
basepath="adui" />
<steps>
<invoke
description="get login page"
url="signin/loadSignin.do" />
<verifyTitle
description="verify title"
text="New Sponsored Search Login" />
</steps>
</webtest>
</target>
</project>
main:
[invoke] java.lang.IllegalStateException: FAILED ASSERTION
[invoke] at org.mozilla.javascript.Kit.codeBug(Kit.java:477)
[invoke] at
org.mozilla.javascript.Interpreter.increaseICodeCapasity(Interpreter.java:17
07)
[invoke] at
org.mozilla.javascript.Interpreter.recordJump(Interpreter.java:1529)
[invoke] at
org.mozilla.javascript.Interpreter.addGoto(Interpreter.java:1459)
[invoke] at
org.mozilla.javascript.Interpreter.visitStatement(Interpreter.java:722)
...
BUILD FAILED
/home/sglaser/util/webtest-2.1/doc/samples/SimpleTest.xml:7: Canoo Webtest:
R_1393.
Test failed.
Test step invoke
(/home/sglaser/util/webtest-2.1/doc/samples/SimpleTest.xml:16: ) named "get
login page" failed with message "Step[invoke "get login page" (1/2)]:
Script error loading page executing webtest at: invoke FAILED ASSERTION