In my code I don't want to use sleep. How do I use wait_until.
########### my code ###############33
btn_logout.click
sleep 3
page.driver.browser.switch_to.alert.accept
CodePudding user response:
This should work
accept_alert do
btn_logout.click
end
It'll wait for the modal as long as the max wait time that is set for Capybara.