How about using wait_for_element_displayed()? for line 28 & 35
I believe that sometimes element is present but not displayed.