How can I run Selenium (used through Capybara) at a lower speed?

后端 未结 5 766
天命终不由人
天命终不由人 2020-12-24 09:15

By default Selenium runs as fast as possible through the scenarios I defined using Cucumber. I would like to set it to run at a lower speed, so I am able to capture a video

5条回答
  •  攒了一身酷
    2020-12-24 09:52

    I wanted to slow down the page load speeds in my Capybara test suite to see if I could trigger some intermittently failing tests. I achieved this by creating an nginx reverse proxy container and sitting it between my test container and the phantomjs container I was using as a headless browser. The speed was limited by using the limit_rate directive. It didn't help me to achieve my goal in the end, but it did work and it may be a useful strategy for others to use!

提交回复
热议问题