Here's snippet of my code
while (!$driver.find_element(:xpath,element2).displayed?)
$driver.find_element(:xpath,element1).click()
end
for some reason element.displayed? throws this exception:
An element could not be located on the page using the given search parameters. (RuntimeError)
I expected the code to return false when the element was not found but instead I got the exception.
Is this working as intended or am I using it incorrectly?