[Webtest] [webtest][JIRA] Closed: (WT-230) <confirm> buggy
Denis N. Antonioli (JIRA)
Denis N. Antonioli (JIRA)" <noreply@canoo.com
Thu, 8 Mar 2007 21:19:28 +0100 (CET)
[ http://webtest-community.canoo.com/jira/browse/WT-230?page=3Dall ]
=20
Denis N. Antonioli closed WT-230:
---------------------------------
Resolution: Invalid
Assign To: Denis N. Antonioli
As per comment of reporter.
> <confirm> buggy
> ---------------
>
> Key: WT-230
> URL: http://webtest-community.canoo.com/jira/browse/WT-230
> Project: WebTest
> Type: Bug
> Versions: 2.0
> Environment: r1389
> Reporter: Jon Nermut
> Assignee: Denis N. Antonioli
>
> I am having a lot of trouble getting the <confirm> subtask to behave corr=
ectly.
> The situation is an <a> tag with an onclick handler, which has a confirm =
button on it.
> The web test script is:
> <expectDialogs description=3D"Expect confirmation for retu=
rn">
> <confirm response=3D"true" />
> </expectDialogs>
> =09=09<clickLink label=3D"Return to Itinerary" />
> =20
> <verifyTitle
> =09=09 description=3D"Ensure we are at the itinerary page"
> =09=09 text=3D"Pems : Itinerary"
> =09=09 />
> This fails with, saying it cannot find the confirm:
> [expectDialogs] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: e=
xpectDialogs "Expect confirmation for return" (41/43)
> [confirm] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: confi=
rm (41/43)
> [clickLink] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: click=
Link (42/43)
> [clickLink] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) =
- -> gotoTarget by clickLink
> [clickLink] INFO (com.canoo.webtest.steps.Step) - Running with: Canoo We=
btest: R_1389.
> [clickLink] INFO (com.canoo.webtest.steps.Step) - Exception thrown from =
this class: com.canoo.webtest.engine.StepFailedException
> [clickLink] INFO (com.canoo.webtest.steps.Step) - Message was: Step[clic=
kLink (42/43)]: Script error loading page executing webtest at: clickLink W=
rapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped com.canoo.web=
test.engine.StepFailedException: Expected dialogs but none found!, Step: Ex=
pectDialogs at C:\svn\pems\trunk\code\webtest\functional\tripManagement\end=
ToEnd.xml:155: with (description=3D"Expect confirmation for return", taskN=
ame=3D"expectDialogs")com.canoo.webtest.extension.dialogs.ExpectDialogs(wra=
ppedSteps=3D[<ConfirmDialogStep at C:\svn\pems\trunk\code\webtest\functiona=
l\tripManagement\endToEnd.xml:156: with (response=3D"true", taskName=3D"co=
nfirm")> ]) (http://localhost:8080/pems/classpath/com/dytech/common/xjsf/co=
mponents/js/jsonrpc-1.0.js#329) (event for HtmlAnchor[<a id=3D"mainForm:nc6=
2:commandBarReturn" href=3D"#" onclick=3D"if(confirm('Are you sure you wish=
to return? (TODO: should be Save, Proceed or Cancel)')){document.forms['ma=
inForm']['mainForm:j_idcl'].value=3D'mainForm:nc62:commandBarReturn';if (do=
cument.forms['mainForm']['action']) document.forms['mainForm']['action'].va=
lue=3D'';document.forms['mainForm'].target=3D'_self';if (this.selectAllForS=
ubmit) selectAllForSubmit(document.forms['mainForm']);document.forms['mainF=
orm'].submit(); return false;} else return false;" class=3D"formLabel">]#1)
> [clickLink] Source code:
> [clickLink] function () {
> [clickLink] =09[native code, arity=3D0]
> [clickLink] }
> This is screwy however as it doesn't give a warning about an unhandled co=
nfirm, and it does actually seem to do the navigation (if i turn on wire de=
bugging I can see the new page come down).
> However, if I leave out the <expectDialogs> step, it complains about havi=
ng no handler for the confirm. It also does not perform the navigation, as =
it is evidently clicking Cancel on the confirm (I thought the default was s=
upposed to be OK??)
--=20
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