[Webtest] ExpectDialog

Paul King webtest@lists.canoo.com
Mon, 26 Jun 2006 20:27:09 +1000


What you have seems correct. I am not sure why you
are getting the message. Can you put another <verifyNoDialogs/>
just before your failing clickButton. You shouldn't need to
but I am interested in what happens.

Paul.

Thomas Colin de Verdière wrote:
> Yes, here is the log since the expectDialog step :
> 
> [expectDialog]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
> expectDia
> log "PM_MES_CST_2: expect message alert with ENTER dialog message" (25/32)
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
> clickButto
> n "Go to the main menu click PF3" (26/32)
> [clickButton]  INFO 
> (com.canoo.webtest.steps.request.AbstractTargetAction) - ->
> gotoTarget by clickButton with name: PF3
> [clickButton]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> 
> findTarge
> t(by button): name=PF3 value=
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed to about:blank
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed with javascript, it will NOT become current response
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed to about:blank
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed with javascript, it will NOT become current response
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed to about:blank
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed with javascript, it will NOT become current response
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed to about:blank
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed with javascript, it will NOT become current response
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> window chang
> ed to http://localhost:8080/patutorial/vsdemo/fs/Listactivities.srv
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of 
> current wind
> ow changed, it will become current response
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Current form 
> set to non
> e
> [clickButton]  INFO (com.canoo.webtest.engine.Context) - Current 
> response now: h
> ttp://localhost:8080/patutorial/vsdemo/fs/Listactivities.srv
> [verifyProperty]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
> verifyP
> roperty "PM_MES_CST_2, PM_MES_CST_3: check message='ds\'ds<ds"ds\\'" 
> (27/32)
> [verifyNoDialogs]  INFO (com.canoo.webtest.steps.Step) - >>>> Start 
> Step: verify
> NoDialogs "verify it passes PM_MES_CST_2, PM_MES_CST_3" (28/32)
> [setSelectField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
> setSele
> ctField "Set select option customer" (29/32)
> [setSelectField]  INFO (com.canoo.webtest.engine.Context) - Current form 
> set to
> (action=/patutorial/vsdemo/fs/Mainmenu.srv)
> [setSelectField]  INFO 
> (com.canoo.webtest.steps.form.AbstractSetFieldStep) - Fou
> nd 1 suitable fields, considering only the first one
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
> clickButto
> n "Go to the customer menu" (30/32)
> [clickButton]  INFO 
> (com.canoo.webtest.steps.request.AbstractTargetAction) - ->
> gotoTarget by clickButton with name: ENTER
> [clickButton]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> 
> findTarge
> t(by button): name=ENTER value=
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo 
> Webtest
> : R_1217.
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - Exception thrown 
> from this
> class: com.canoo.webtest.engine.StepFailedException
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - Message was: 
> Step[clickButt
> on "Go to the customer menu" (30/32)]: Script error loading page 
> executing webte
> st at: clickButton Wrapped com.canoo.webtest.engine.StepFailedException: 
> Expecte
> d dialogs but none found!, Step: ExpectDialog at 
> D:\WebTest\webtests\modules\lis
> tactivities\verifieMessageConstanteEchappement.xml:2:  with 
> (saveProperty="messa
> geAlert", description="PM_MES_CST_2: expect message alert with ENTER 
> dialog mess
> age", dialogType="alert", stepType="expectDialog") (Embedded script in 
> http://lo
> calhost:8080/patutorial/vsdemo/fs/Listactivities.srv#6)
> [clickButton] Source code:
> [clickButton] function () {
> [clickButton]   [native code, arity=0]
> [clickButton] }
> 
> Paul King a écrit :
>>
>> Are you using <verifyNoDialogs/> on the previous page?
>> Perhaps one of the dialogs you were expecting to be
>> "consumed" hasn't been yet.
>>
>> Cheers, Paul.
>>
>> Thomas Colin de Verdière wrote:
>>> Hello,
>>> I've the following error, however, the expected dialog box already 
>>> 'appear' in the previous page.
>>> So i thought the clickButton won't try to look for a dialog box 
>>> again. Do you have any idea ?
>>>
>>> Test step clickButton 
>>> (D:\WebTest\webtests\modules\mainmenu\goCustomermenu.xml:4: )  named 
>>> "Go to the customer menu" failed with message "Step[clickButton "Go 
>>> to the customer menu" (29/31)]: Script error loading page executing 
>>> webtest at: clickButton Wrapped 
>>> com.canoo.webtest.engine.StepFailedException: Expected dialogs but 
>>> none found!, Step: ExpectDialog at 
>>> D:\WebTest\webtests\modules\listactivities\verifieMessageConstanteEchappement.xml:2:  
>>> with (saveProperty="messageAlert", description="PM_MES_CST_2: expect 
>>> message alert with ENTER dialog message", dialogType="alert", 
>>> stepType="expectDialog") (Embedded script in 
>>> http://localhost:8080/patutorial/vsdemo/fs/Listactivities.srv#6)
>>> Source code:
>>> function () {
>>>        [native code, arity=0]
>>> }
>>> "
>>>
>>> Thomas
>>>
>>> _______________________________________________
>>> WebTest mailing list
>>> WebTest@lists.canoo.com
>>> http://lists.canoo.com/mailman/listinfo/webtest
>>>
>>>
>>
>> _______________________________________________
>> WebTest mailing list
>> WebTest@lists.canoo.com
>> http://lists.canoo.com/mailman/listinfo/webtest
>>
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
>