2015-05-22 28 views
-1

執行腳本後,我在命令提示符下收到了這種響應。我已經在步驟中添加了步驟,但仍然需要添加更多代碼。'在Pecumber中執行腳本時出現'Pending Error message'

Given(/^i am on Gmail Homepage $/) do 
    Pending# write code here that turns the phrase above into concrete actions 
end 
When(/^enter blank details for login $/) do 
    Pending# write code here that turns the phrase above into concrete actions 
end 
Then(/^show error message $/) do 
    Pending# write code here that turns the phrase above into concrete actions 
end 

回答

1

當您的步驟定義與步驟不完全匹配時,您將從Cucumber獲得此類響應。仔細檢查這些正則表達式是否與您的Gherkin文件中的步驟相匹配。儘管如此,我猜猜尾部空間是你的問題。

Then(/^show error message $/) do 
         ^
0

您需要檢查大寫/小寫的句子以確保它與步驟定義完全相同。

我發現相同的問題,並通過將「T」更改爲「t」來解決它。

相關問題