Cucumber + testing JS alert

前端 未结 5 554
失恋的感觉
失恋的感觉 2021-02-04 07:05

I\'m trying to test a JS confirmation dialog with Cucumber on Rails. I have a window.onbeforeunload event handler that will prompt you with a confirmation dialog if you try to n

5条回答
  •  一整个雨季
    2021-02-04 07:34

    You can use Webrat or Selenium with Cucumber to test this.

    My guess is that you want Simulated Browser or Automated Browser testing,

    You can use Webrat or Webrat::Selenium or simply Selenium with Cucumber in such cases.

    I have tested this using Selenium and Cucumber before, but can't seem to find the code, will edit the post it if i do.

    HTH

提交回复
热议问题