I am trying to access those properties in the following way:
def check_if_element_is_selected element
if element.selected?
return true
else
fail "The element is not selected"
end
end
But I keep getting the following error:
undefined method `selected?' for nil:NilClass (NoMethodError)
Is there any other way to check these properties?