[Webtest] Configuring IfStep to fail when condition fails
Mart Toom
Mart Toom <mart.toom@aqris.com>
Wed, 17 Oct 2007 14:41:47 +0300
Hi,
I have a situation where I use same verify condition with multiple users. For one user condition failing is already a sign of failing step, for another user more thorough verification should be performed.
Is it somehow possible to configure ifStep to fail when condition fails?
Script looks something like following:
....
<ifStep description = "If true, then..." >
<condition >
<verifyInputField
description = "Check if select is visible for user"
name="SelectId"
value = "${id}" />
</condition>
<setRadioButton
description = "Select item for editing"
name = "SelectId"
value = "${id}" />
<clickButton
description = "Go to edit mode"
label = "${button}" />
<verifyText
description = "Verify text on page"
text = "${label}" />
<not>
<verifyElementText
description="Check that the name is changed"
type="span"
htmlId="ElementSerialId"
text="${SecondName}" />
</not>
</ifStep>
....
Currently test fails only if nested steps are executed. Is there any way to make test fail also when condition fails?
BR,
Mart T