[Webtest] no alert/confirm handler installed warning after attempt to pass through java-script dialogs

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Thu, 07 Jun 2007 09:15:12 +0200


Hi Andrew,

I still believe that the problem is that clickElement doesn't do what
you wanted.

What is it for an input field?

To have an idea of the current state of the DOM after clickElement, you
can do following
<groovy>
println step.context.currentResponse.asXml()
</groovy>

this will dump the current state of the the page to the console.

Marc.

Andrew Sickorsky wrote:
> Hello Marc,
> 
> 
> Thanks  for  answer. 
>  Test failes with <verifyText text="Total records: 110"/> step. 
> 
> The logic is:
> 
>  - click image button (Duplicate rows)
> 
>  - click Ok in the confirm-like javascript pop-up
> 
>  - check, that 10 records were duplicated (total count should be equal
> to 110)
> 
> 
>   Ideally (because i'm satisfy with 'Ok' answer for confirm message by
> default) no <expectDialog> step is needed. 
> But - in fact nothing happens, no record are duplicated though
> <clickelement ../> pass successfully.
> 
> 
>   May be the reason is that we use GWT table (it constructs table with
> records after page loading via JavaScript), i don't know - it's another
> question
> 
> 
>> Hi Andrew,
> 
> 
>> as nobody answers I will try (even if don't feel myself very qualified
> 
>> concerning expectDialog step).
> 
> 
>> Where does your test fail? When does your application complain with "Please
> 
>> select rows"? Is it possible, that your <clickElement .../> doesn't do what
> 
>> you wanted?
> 
> 
>> Marc.
> 
> 
> 
>> Andrew Sickorsky wrote:
> 
> 
>>> Hello All!
> 
> 
>>> I'm trying to use WebTest with pop-up alert/confirm messages via
> 
>>> ExpectDialog:
> 
> 
>>> <expectDialog description="Expected dialog for record duplicating"
> 
>>> dialogType="confirm"/>
> 
>>> <clickElement
> 
>>> xpath="//ul[@class='dataProcessing']/li/input[@alt='Duplicate record']"
> 
>>> description="Duplicate first 10 records"/>
> 
>>> <verifyText text="Total records: 110" />
> 
> 
>>> But nothing happens: there is one warning  "window.alert("Please select
> 
>>> rows") no alert handler installed". 
> 
>>> BTW no scence in presence of <expectDialog> step in the testsuite.
> 
> 
>>> So, what should I do/install/remove/modify to force WebTest to click on
> 
>>> such dialogs?
> 
> 
>>> WebTest 2.5 was used.
> 
> 
>>> Thanks in advance, and sorry for disturbing
> 
> 
>>> -- 
> 
>>> Best regards,
> 
>>>  Andrew.
> 
>>> Texuna Tech                         
> 
>>> mailto:andrew.sickorsky@texunatech.com
> 
> 
> 
> 
> 
> 
> -- 
> 
> Best regards,
> 
>  Andrew                            mailto:andrew.sickorsky@texunatech.com
> 
> _______________________________________________ WebTest mailing list
> WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest


-- 
Blog: http://mguillem.wordpress.com