[Webtest] [webtest][JIRA] Closed: (WT-299) JavaScript error encountered while
running WebTest
Marc Guillemot (JIRA)
Marc Guillemot (JIRA)" <noreply@canoo.com
Fri, 6 Apr 2007 09:30:33 +0200 (CEST)
[ http://webtest-community.canoo.com/jira/browse/WT-299?page=all ]
Marc Guillemot closed WT-299:
-----------------------------
Resolution: Invalid
Assign To: Marc Guillemot
Your js code is invalid and you would get exactly the same js error in Firefox. I guess that
if(this.form[f:emailId].value == '')
should just be changed to
if(this.form['f:emailId'].value == '')
More generally, please post first such problems to the mailing list!
> JavaScript error encountered while running WebTest
> --------------------------------------------------
>
> Key: WT-299
> URL: http://webtest-community.canoo.com/jira/browse/WT-299
> Project: WebTest
> Type: Bug
> Environment: Windows XP, MyEclipse, Java, JSF
> Reporter: Shyam Bhaskaran
> Assignee: Marc Guillemot
> Attachments: ACM_Maintain_Authorized_User_List.xml, superMgr.faces.htm
>
> Hello Support,
> My WebTest using canoo is failing with the below error message, the test fails at step 28 when the Submit Button is clicked, I am also attaching the script file along with this Issue. Please have a look and let me know how to resolve this issue, I am facing similar kind of problem with 2 other test failing at the same point. Let me know if you need more information.
> setselectfield
> Pick Country
> Resulting page text United States
> xpath //select[contains(@name,'f:s1:_id57:country')]
> 00:00:06
> 25 setselectfield
> Pick Region text California
> xpath //select[contains(@name,'f:s1:_id57:region')]
> 0
> 26 storeXPath
> Extract href of Add More property addMore
> xpath string(//form[@id='f']/table[2]//tr/td//@href)
> => value #
> 16
> 27 clickLink
> Click link for Add More
> Resulting page href #
> 00:00:05
> 28
> Error
> Page clickButton
> Click Submit Button
> Resulting page name f:_id94
> 47
> 29 clicklink
> label ${logout.link}
> save logoutPage
> stepid logout user
>
> 30 verifytitle
> stepid Verify logout
> text ${login.title}
>
> 31 verifytext
> regex true
> stepid Look for logout text
> text You have successfully logged out.
>
> Error
> Message
> JavaScript error loading page http://mikeb.synopsys.com:12000/aca/superMgr.faces: missing ] in index expression (event for HtmlSubmitInput[<input name="f:_id94" value="Submit" onclick=" if(this.form[f:emailId].value == '') { alert('Please specify an email ID'); return false; } " type="submit">]#1)
> Location
> C:\MyEclipse-workspace\ACAccount\functional_test\usecases\ACM_Maintain_Authorized_User_List.xml (line: 107)
> Details
> javascript error missing ] in index expression (event for HtmlSubmitInput[<input name="f:_id94" value="Submit" onclick=" if(this.form[f:emailId].value == '') { alert('Please specify an email ID'); return false; } " type="submit">]#1)
> line -1
> javascript source function () {
> [native code, arity=0]
> }
>
> failing line <no source>
> Back to Test Report Overview
> --------------------------------------------------------------------------------
> Created using Canoo Webtest (R_1533). Report created at 06.04.2007 10:33
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira