I am writing automation test in Selenium using Python. One element may or may not be present. I am trying to handle it with below code, it works when element is present. But scr
Why not simplify and use logic like this? No exceptions needed.
if elem.is_displayed(): elem.click()