I did try this, but I got an error:
com.canoo.webtest.engine.StepFailedException: No button found, Step: 
ClickButton at 
C:\java\eplan70\src\web_test\SmokeTest\TestContributionGroups.xml:100: with 
(description=" click the ok button ", label="OK", taskName="clickbutton")
Location: 

My script has:
        <expectDialog description="expect a popup window"
            dialogType="confirm" response="OK" /> 
            
         <clickbutton
             description=" click the ok button "
             label="OK"/>

Is it possible the javascript popup is defective in some way?  The source code 
for it is in my original email.
Thank you,
Lisa

 -------------- Original message ----------------------
From: "Aarathi Niranjan" <[EMAIL PROTECTED]>
> Yes, you should use 'clickButton'. But it will work only if you specify
> expectDialog before the clickbutton.
> 
> Example:
>         <expectDialog
>                 description="Expect a pop-up window"
>                 dialogType="confirm" response="true" />
> 
>         <clickbutton
>                 description=" click the ok button "
>                 label="OK"/> <!-- Replace with your button name -->
> 
> Thanks,
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Lisa Crispin
> Sent: Friday, September 15, 2006 12:19 PM
> To: [email protected]
> Subject: RE: [Webtest] javascript popups
> 
> Thanks.  ExpectDialog seems like just the ticket but it doesn't seem to
> click the button for me.  The examples on the page are confusing me
> because they are for complex scenarios. Does anyone have a simple
> example of how to click the 'ok' button on a confirm window (eg. "Do you
> really want to delete" with OK and Cancel buttons).
> 
> I tried this:
>         <expectDialog description="click the ok button"
>             dialogType="confirm" response="true" />
> 
> I don't get any errors, but neither does it click the button.  Do I have
> to use clickButton?  It didn't seem to me I should from the
> documentation, but I tried it anyway, WebTest predictably couldn't find
> the button.
> thanks
> Lisa
> 
>  -------------- Original message ----------------------
> From: "Aarathi Niranjan" <[EMAIL PROTECTED]>
> > You can do it with <expectDialog>
> > 
> > http://webtest.canoo.com/webtest/manual/expectDialog.html
> > http://webtest.canoo.com/webtest/manual/expectDialogs.html
> > 
> > Hope that helps,
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Lisa Crispin
> > Sent: Friday, September 15, 2006 11:19 AM
> > To: [email protected]
> > Subject: [Webtest] javascript popups
> > 
> > A couple years ago we struggled with trying to handle javascript popup
> > windows with WebTest and never figured out how to do it.
> > 
> > I've been searching the archive to see if there has been improvement
> > since version 2 but I can't quite tell.
> > 
> > If I have a javascript window such as this, how can I click the ok
> > button with WebTest?  Our current workaround is either to just go
> > directly to the url, or write the script in Watir where we know how to
> > click this button.
> > onclick="javascript: if (window.confirm('Are you sure you want to
> delete
> > \'Monthly Employees\'?'))
> >
> location.href='/plan/manageEmployeeGroups.vm?mode=delete&groupId=16606';
> > "" 
> > 
> > Thanks,
> > Lisa
> > _______________________________________________
> > WebTest mailing list
> > [email protected]
> > http://lists.canoo.com/mailman/listinfo/webtest
> > _______________________________________________
> > WebTest mailing list
> > [email protected]
> > http://lists.canoo.com/mailman/listinfo/webtest
> 
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to