Geb + Cucumber: Restart Browser Between Scenarios

余生颓废 提交于 2019-12-01 13:05:00

Based on some more research I've done, it looks like there are a few ways to handle this:

  • Just like I am already doing it, by logging out at the end of a scenario (or you could do it at the beginning
  • Make logging out its own scenario
  • In the env.groovy Before hook, add to LogoutPage
  • Logout using a Background

Add the following line to the After hook in env.groovy:

bindingUpdater.browser.clearCookies()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!