Entering on behalf of Suresh Vemuri for his post in the RF user group.
If I am reading the code correctly, then the problem is that pageShouldContainButton catches an AssertionError, but Element.pageShouldContainElement throws a Selenium2LibraryNonFatalException, which is not a descendant of AssertionError. Therefore this code is not executed:
element.pageShouldContainElement(locator, "button", message, logLevel);
Entering on behalf of Suresh Vemuri for his post in the RF user group. If I am reading the code correctly, then the problem is that pageShouldContainButton catches an AssertionError, but Element.pageShouldContainElement throws a Selenium2LibraryNonFatalException, which is not a descendant of AssertionError. Therefore this code is not executed:
element.pageShouldContainElement(locator, "button", message, logLevel);