[Webtest] JavaScript error

Ralf Mühle Ralf Mühle
Wed, 13 Aug 2008 12:18:25 +0200


Hi

I'm new to webtest and wrote a simple webtest for a simple JSF page. For 
this JSF Page we use only the taglibs from the reference implemention. 
The application is running under Tomcat 6

For the tests I do the following steps (see below):
Step 1: call jsf page
Step 2. check if clear button works
Step 3: check with entering a wrong value

After Step 2 I get the following error message:
JavaScript error loading page http://localhost:8080/lxone/login.jsf: 
ReferenceError: "oamSetHiddenInput" is not defined. (onclick event for 
HtmlSubmitInput[<input id="login:login" name="login:login" type="submit" 
value="Login" onclick="if(typeof 
window.clearFormHiddenParams_login!=&apos;undefined&apos;){clearFormHiddenParams_login(&apos;login&apos;);}if(typeof 
window.getScrolling!=&apos;undefined&apos;){oamSetHiddenInput(&apos;login&apos;,&apos;autoScroll&apos;,getScrolling());}" 
class="btnS">]#1)

<...>
<group description="call mobileClient">
    &gotoLogin;
</group>
<group description="check clear button">
    <setInputField name="login:positionID" value="${positionID}" />
    <setInputField name="login:user" value="${user}" />
    <setInputField description="Set password field login:password: kb" 
name="login:password" value="${password}" />
    <clickButton label="${clear}" />
    <verifyInputField name="login:positionID" value="" />
    <verifyInputField name="login:user" value="" />
    <verifyInputField name="login:password" value="" />
</group>
<!-- call login page again, else we get an JavaScript error. Why??? -->
<!--
<group description="call mobileClient">
    &gotoLogin;
</group>
-->
<group description="check empty id">
    <setInputField name="login:positionID" value="" />
    <setInputField name="login:user" value="${user}" />
    <setInputField description="Set password field" 
name="login:password" value="${password}" />
    <clickButton label="${login}" />
    <verifyText description="Verify that text is contained in the page" 
text="${positionRequired}" />
</group>
</...>

Can someone help me to find the error?

Thanks
Ralf