Take a screenshot with Cucumber

后端 未结 6 852
伪装坚强ぢ
伪装坚强ぢ 2021-01-03 17:31

I just learn how to use cucumber. Can you tell me how to complete this code?

You can implement step definitions for undefined steps with these snippets:



        
6条回答
  •  情歌与酒
    2021-01-03 17:44

    1. You can use canned steps (pre-defined) to take screenshot.

      Then take picture
      

    There is not need for any step definition. Cucumber also comes with many other pre-defined steps. See other canned steps

    1. If you still need to write step definition.

      Then /^I take a screenshot$/ do
        page.save_screenshot('image_name.png')
      end
      

提交回复
热议问题