31 messages in com.canoo.lists.webtestRE: [Webtest] how to implement "if" l...
FromSent OnAttachments
Chang Su23 Feb 2007 18:41 
Paul King23 Feb 2007 20:50 
Chang Su24 Feb 2007 23:14 
Dierk Koenig25 Feb 2007 03:27 
Chang Su25 Feb 2007 09:07 
Paul King28 Feb 2007 03:42 
John and Pip28 Feb 2007 14:09 
Chang Su28 Feb 2007 16:08 
Paul King01 Mar 2007 01:37 
Denis N. Antonioli01 Mar 2007 01:42 
Chang Su01 Mar 2007 10:39 
Chang Su01 Mar 2007 13:20 
Chang Su01 Mar 2007 16:49 
Marc Guillemot02 Mar 2007 02:05 
Chang Su02 Mar 2007 09:33 
Chang Su02 Mar 2007 11:23 
Chang Su02 Mar 2007 13:12 
Marc Guillemot05 Mar 2007 01:29 
Chang Su05 Mar 2007 06:51 
Marc Guillemot05 Mar 2007 07:05 
Chang Su05 Mar 2007 10:40 
Chang Su05 Mar 2007 13:44 
Chang Su05 Mar 2007 18:08 
Marc Guillemot06 Mar 2007 05:54 
Marc Guillemot06 Mar 2007 05:55 
Marc Guillemot06 Mar 2007 06:01 
Chang Su06 Mar 2007 07:48 
Chang Su06 Mar 2007 11:02 
Chang Su06 Mar 2007 11:28 
Chang Su06 Mar 2007 19:53 
Chang Su06 Mar 2007 20:22 
Subject:RE: [Webtest] how to implement "if" logic
From:Dierk Koenig (dier@canoo.com)
Date:02/25/2007 03:27:14 AM
List:com.canoo.lists.webtest

change <ifStep test="${uri}" > to <ifStep test="#{uri}" >

(alternatively, set the propertytype to 'ant')

Dierk

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Chang Su Sent: Sonntag, 25. Februar 2007 8:15 To: webt@lists.canoo.com; Paul King Subject: Re: [Webtest] how to implement "if" logic

Thanks Paul, I tried following but could not get it to work,

<storeXPath description="Extract href of next button" xpath="//a[@id='form1:table1:_tableActionsBottom:_paginationNextButton']" property="uri" />

<ifStep test="${uri}" > <clickElement xpath="//a[@id='form1:table1:_tableActionsBottom:_paginationNextButton']" /> <verifytitle text="All Domains"/> .....

</ifStep>

it could not pass the test though the button is present. Do you spot any problem with above code?

thanks,

Mary

--- Paul King <pau@asert.com.au> wrote:

Maybe ifStep is what you are after:

http://webtest.canoo.com/webtest/manual/ifStep.html

Store an xpath that would be true based on the next link and use that as the test parameter.

Paul.

Chang Su wrote:

Hi,

I have a BUI page which mainly includes a table. If the rows in the table are more than 10, then there is a "Next" button shown on the page and clicking on it goes to next page of the table.

So I need to implement something like,

1. use <scriptStep> to obtain table contents on page 1

2. If there is a "Next" button on the page, click the button to go to next page

3. use <scriptStep> to obtain table contents on page 2

I know how to do 1) and 3), however I don't know how to implement the if logic using webtest. Anyone has idea how to implement this?

thanks,

Chang

__________________________________________________________________

__________________

Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A.

http://answers.yahoo.com/dir/?link=list&sid=396545367

__________________________________________________________________