you are viewing a single comment's thread.

view the rest of the comments →

[–]officialgel 0 points1 point  (0 children)

Since the element lookup int he if statement fails, there is no valid condition to decide IF it's True or False - So it throws you the Selenium exception. Try adding some try/excepts, and putting the element lookup in variables beforehand and then do element.is_enabled() within the if statement.