Rails + Cucumber/Capybara: How to set/retrieve cookies in tests?

前端 未结 3 1774
你的背包
你的背包 2021-02-12 11:48

I\'m implementing a lazy login feature. My cucumber feature should describe it:

    Feature: User log in

        Scenario: Lazy login
            Given I didn\'         


        
3条回答
  •  野的像风
    2021-02-12 12:13

    Use https://github.com/nruth/show_me_the_cookies which wraps the driver methods. It has methods for getting cookies, deleting cookies, and a method for creating cookies called create_cookie.

提交回复
热议问题