This could use a more user-friendly failure message with information about the element that should be visible.