[ http://webtest-community.canoo.com/jira/browse/WT-230?page=all ]
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
> correctly.
> The situation is an <a> tag with an onclick handler, which has a confirm
> button on it.
> The web test script is:
> <expectDialogs description="Expect confirmation for return">
> <confirm response="true" />
> </expectDialogs>
> <clickLink label="Return to Itinerary" />
>
> <verifyTitle
> description="Ensure we are at the itinerary page"
> text="Pems : Itinerary"
> />
> This fails with, saying it cannot find the confirm:
> [expectDialogs] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
> expectDialogs "Expect confirmation for return" (41/43)
> [confirm] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: confirm
> (41/43)
> [clickLink] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickLink
> (42/43)
> [clickLink] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - ->
> gotoTarget by clickLink
> [clickLink] INFO (com.canoo.webtest.steps.Step) - Running with: Canoo
> Webtest: 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[clickLink (42/43)]: Script error loading page executing webtest at:
> clickLink Wrapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped
> com.canoo.webtest.engine.StepFailedException: Expected dialogs but none
> found!, Step: ExpectDialogs at
> C:\svn\pems\trunk\code\webtest\functional\tripManagement\endToEnd.xml:155:
> with (description="Expect confirmation for return",
> taskName="expectDialogs")com.canoo.webtest.extension.dialogs.ExpectDialogs(wrappedSteps=[<ConfirmDialogStep
> at
> C:\svn\pems\trunk\code\webtest\functional\tripManagement\endToEnd.xml:156:
> with (response="true", taskName="confirm")> ])
> (http://localhost:8080/pems/classpath/com/dytech/common/xjsf/components/js/jsonrpc-1.0.js#329)
> (event for HtmlAnchor[<a id="mainForm:nc62:commandBarReturn" href="#"
> onclick="if(confirm('Are you sure you wish to return? (TODO: should be Save,
> Proceed or
> Cancel)')){document.forms['mainForm']['mainForm:j_idcl'].value='mainForm:nc62:commandBarReturn';if
> (document.forms['mainForm']['action'])
> document.forms['mainForm']['action'].value='';document.forms['mainForm'].target='_self';if
> (this.selectAllForSubmit)
> selectAllForSubmit(document.forms['mainForm']);document.forms['mainForm'].submit();
> return false;} else return false;" class="formLabel">]#1)
> [clickLink] Source code:
> [clickLink] function () {
> [clickLink] [native code, arity=0]
> [clickLink] }
> This is screwy however as it doesn't give a warning about an unhandled
> confirm, and it does actually seem to do the navigation (if i turn on wire
> debugging I can see the new page come down).
> However, if I leave out the <expectDialogs> step, it complains about having
> 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 supposed
> to be OK??)
--
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
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest