I've been flat out this week. If you are still having troubles
I will try to look at this again on the weekend.
Cheers, Paul.
Chang Su wrote:
Hi, Dierk,
thanks for your reply. If I change to use "#{uri}" I
am getting following exception,
Exception raised:
com.canoo.webtest.engine.StepExecutionException: One
of the 'test' or the 'unless' attributes or nested
tags is required., Step: IfStep at
/home/testsuites/src/AllDomains/SimpleHTTPS.xml:105:
with
(taskName="ifStep")com.canoo.webtest.engine.StepExecutionException:
One of the 'test' or the 'unless' attributes or nested
tags is required., Step: IfStep at
/home/testsuites/src/AllDomains/SimpleHTTPS.xml:105:
with (taskName="ifStep")
at
com.canoo.webtest.steps.Step.paramCheck(Step.java:423)
at
com.canoo.webtest.steps.control.IfStep.verifyParameters(IfStep.java:117)
at
com.canoo.webtest.steps.Step.execute(Step.java:105)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at
org.apache.tools.ant.Task.perform(Task.java:364)
......
Mary
--- Dierk Koenig <[EMAIL PROTECTED]> wrote:
change
<ifStep test="${uri}" >
to
<ifStep test="#{uri}" >
(alternatively, set the propertytype to 'ant')
Dierk
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Chang Su
Sent: Sonntag, 25. Februar 2007 8:15
To: [email protected]; 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="//[EMAIL
PROTECTED]'form1:table1:_tableActionsBottom:_paginationNextButton']"
property="uri" />
<ifStep test="${uri}" >
<clickElement
xpath="//[EMAIL
PROTECTED]'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 <[EMAIL PROTECTED]> 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
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest