Stop on failure doesn't stop on failure?


I found couple of question about STOP_ON_FAILURE not stopping test execution, and surprisingly no answers about when this is going to be fixed OR if it behaves correctly, why and how can I know in which cases it behaves like this.

For some reason, there are cases where WebUI.waitForElementPresent(findTestObject(“pathToTestObject”),10, FailureHandling.STOP_ON_FAILURE) (and possibly other functions like verifyElement…) doesn’t fail and simply continues the test. This scared me a little because we use this several times in 300 of our test cases, and I simply cannot know if this step gives me the proper result.

So are there some KNOWN cases where this failure handling wouldn’t stop the test?

I accept there is a simple workaround with assert, but I’d rather avoid editing all our test scripts.

I can confirm that waitForElementPresent() is trapping exceptions internally and forcing you to deal with the boolean result in your Test Case code. This seems less than ideal and runs counter to the spirit of the API documentation.

I recall there was in the past considerable discussion about FailureHandling with these APIs but I don’t recall how that was settled.

@ThanhTo @devalex88 @Jass

Guys, I think perhaps the documentation needs to reflect the actual behavior of this API. The verifyElement* family work as documented, but the wait* family do not handle STOP_ON_FAILURE as documented.

Moving to bug reports.