Received: by 10.180.7.202 with SMTP id l10mr301177wia.4.1334992703209; Sat, 21 Apr 2012 00:18:23 -0700 (PDT) X-BeenThere: behat@googlegroups.com Received: by 10.216.199.225 with SMTP id x75ls5383719wen.9.gmail; Sat, 21 Apr 2012 00:18:22 -0700 (PDT) Received: by 10.180.94.38 with SMTP id cz6mr301905wib.1.1334992702523; Sat, 21 Apr 2012 00:18:22 -0700 (PDT) Received: by 10.180.94.38 with SMTP id cz6mr301904wib.1.1334992702508; Sat, 21 Apr 2012 00:18:22 -0700 (PDT) Return-Path: Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by gmr-mx.google.com with ESMTPS id fm5si598515wib.2.2012.04.21.00.18.22 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 Apr 2012 00:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of ever....@gmail.com designates 74.125.82.179 as permitted sender) client-ip=74.125.82.179; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ever....@gmail.com designates 74.125.82.179 as permitted sender) smtp.mail=ever....@gmail.com; dkim=pass header...@gmail.com Received: by werg1 with SMTP id g1so6808065wer.38 for ; Sat, 21 Apr 2012 00:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type; bh=LsHTi38dmrkuUp8Yl13/VyXup7xhfrCoDStVmWRo4PE=; b=QhMfMT1IPgqMilHWK0DkxQi1mW6mnb1IeIkY8VSqbRNuIVfk/zf24rZLlMiw70ekYY iUGa92E85Un9rTx7LLowqU6TO/JJiE60faRXUCp1Q40BE6szb2/9BHVnaQyEPbYONHCd ehZUG64xYB4vNbyaBVu3ivODoKDgCPSqfb6Opq3xlTDd7h3BaP0Q61qf6A2YGLVtP64E 5muhZ5ex2DwRznnuq5ltsOt49W+WdvvE+zd1kx6MKrRM0SC8jEF7I99HzE59tgqal51Z YjS9GJb1qnrJ/+2GqZb+pdJigqAzBX47mL64PiWyOkz34ceKVpbqDK69txzvlI1HVQPe WuVA== Received: by 10.216.137.100 with SMTP id x78mr5663692wei.72.1334992702357; Sat, 21 Apr 2012 00:18:22 -0700 (PDT) Return-Path: Received: from [10.157.130.250] (37-8-168-32.coucou-networks.fr. [37.8.168.32]) by mx.google.com with ESMTPS id e6sm3295814wix.8.2012.04.21.00.18.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 Apr 2012 00:18:21 -0700 (PDT) Date: Sat, 21 Apr 2012 09:18:18 +0200 From: Konstantin Kudryashov To: behat@googlegroups.com Message-ID: <9CBE99635FBC4D85AFC69261701F0...@gmail.com> In-Reply-To: <20553450.1276.1334786240071.JavaMail.geo-discussion-forums@pbcnk6> References: <20553450.1276.1334786240071.JavaMail.geo-discussion-forums@pbcnk6> Subject: Re: Mink testing sites that use alert() and confirm() X-Mailer: sparrow 1.1 (build 442.5) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4f925f3a_515f007c_5e" --4f925f3a_515f007c_5e Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline There's simply no solution. Alert or Ask are called modal windows, because they block currently running script loop till user close those dialogs. There's simply no way to do it programmatically. That's basically the main reason, why modal dialogs in frontend are bad practice. -- Konstantin Kudryashov Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday 18 April 2012 at 23:57, ushap wrote: > Hi Simon, > > Did you find out a solution to this? If so, please share with us. > > Thanks, > Usha > > On Tuesday, February 21, 2012 7:03:53 AM UTC-8, SimonC wrote: > > Hi again. > > > > I'm using Mink to test a site via the Sahi driver. The site uses > > Javascript's confirm() function (eg to confirm deletion of a record), > > and I need to test that this works for both 'ok' and 'cancel' buttons. > > > > If I understand it correctly, Sahi supresses the actual alert/confirm > > dialog, and defaults to simulating a positive response. This is a good > > start, but I also need to test the negative response. > > > > The Sahi documentation discusses this topic a bit (see > > http://sahi.co.in/w/_expectconfirm ) but I'm unsure how to translate > > this to Mink. Any help on this would be appreciated. :) > > > > It would be good to be able to also run the same tests in Selenium, > > but my main focus is Sahi at the moment. > > > > Many thanks. > > > > > > Simon C. --4f925f3a_515f007c_5e Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
There's simply no solution. Alert or Ask are called modal windows= , because they block currently running script loop till user close those = dialogs.

There's simply no way to do it programmatically. That's basically = the main reason, why modal dialogs in frontend are bad practice.

-- 
Konstantin Kudryashov
Sent with Sparrow

= =20

On Wednesday 18 April 2012 at 23:5= 7, ushap wrote:

Hi Simon,

   Did you find out a solution to this=3F If so, please= share with us.

Thanks,
Usha

On= Tuesday, =46ebruary 21, 2012 7:03:53 AM UTC-8, SimonC wrote:
Hi again.

I'm using Mink to test a site via the Sahi driver. The site uses
Javascript's confirm() function (eg to confirm deletion of a record),=
and I need to test that this works for both 'ok' and 'cancel' buttons= .

If I understand it correctly, Sahi supresses the actual alert/confirm=
dialog, and defaults to simulating a positive response. This is a goo= d
start, but I also need to test the negative response.

The Sahi documentation discusses this topic a bit (see
http://sahi.co.in/w/=5Fexpectconfirm ) but I'm unsure ho= w to translate
this to Mink. Any help on this would be appreciated.  :)

It would be good to be able to also run the same tests in Selenium,
but my main focus is Sahi at the moment.

Many thanks.


  Simon C.
=20 =20 =20 =20
=20

--4f925f3a_515f007c_5e--