Fix wait_for_navigation and click_text reliability