in mustella/src/main/java/marmotinni/TestCase.java [238:282]
private boolean runSteps(WebDriver webDriver)
{
while (currentIndex < numSteps)
{
// return if a step failed
if (testResult.hasStatus())
return true;
TestStep step = currentSteps.get(currentIndex);
if (!(step instanceof AssertStep))
{
// look at subsequent steps for Asserts and set them up early
for (int j = currentIndex + 1; j < numSteps; j++)
{
// scan following asserts for AssertEvents and set them up early
TestStep nextStep = currentSteps.get(j);
if (nextStep instanceof AssertStep)
{
((AssertStep)nextStep).preview(webDriver, this, testResult);
/* TODO: (aharui) re-enable when we need these asserts
// do a check to be sure folks are using AssertEventPropertyValue correctly
if (nextStep instanceof AssertEventPropertyValue)
{
// AEPV must follow an AssertEvent or another AEPV
if (j == 0 || !(currentSteps[j-1] instanceof AssertEvent || currentSteps[j-1] instanceof AssertEventPropertyValue))
TestOutput.logResult("WARNING: AssertEventPropertyValue may be missing preceding AssertEvent");
}
else if (nextStep instanceof AssertError)
{
if (step instanceof SetProperty)
SetProperty(step).expectError = true;
}
*/
}
else
break;
}
}
if (TestCase.showSteps)
System.out.println(step.toString());
step.execute(webDriver, this, testResult);
currentIndex++;
}
return true;
}