我们通过将整个步骤作为参数包装到“步骤定义”中来解决此问题。换句话说,步骤
Given I am on my website
转换成
'Given I am on my website'
步骤定义实际上将接受与步骤对应的字符串参数
@And("(.*)") //plus something specific to map step public void Initialization(String step) throws Exception { //do something with step }


