Skip to content

Return false from predicate instead of raising

Mark Lapierre requested to merge ml-fix-has-element-predicate-method into master

What does this MR do and why?

This fixes a small problem with the logic in the has_element? method when the element is disabled.

It uses find_element, which raises an ElementNotFound error if the element does not exist. This change rescues the error and returns false. That will allow the method to be used properly in expect statements.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading