Is there a capybara for Node.js?

前端 未结 8 950
情话喂你
情话喂你 2021-02-05 03:35

Does anyone know whether there is anything similar to capybara for Node.js?

8条回答
  •  暖寄归人
    2021-02-05 04:02

    Cucumber-JS is the closest you will get in Javascript: https://github.com/cucumber/cucumber-js

    You can use the library to drive JS, headless and Selenium, however it is missing the 'capybara' shared API between each of the different 'worlds'. There is a good talk at http://skillsmatter.com/podcast/agile-testing/cucumber-js-cuke-up-your-javascript and supporting github code at https://github.com/jbpros/cukecipes

    I'm hoping that when the phantomjs webdriver wire protocol is finished (https://github.com/detro/ghostdriver) and if Soda/Selenium (https://github.com/LearnBoost/soda) is able to drive it then the headless tests will be able to be automated via Selenium thus bypassing the need for Capybara.

提交回复
热议问题