我在Selenium中编写了一个特征文件,其中一个表shell中有一个撇号。在运行测试用例时,Cucumber报告出现了,因为无法翻译"'""作为有效的角色。像这样:
Then user sees the following title
|Banker's report for this month|
我该如何解决这个问题?我试过了
|Banker\'s report for this month|
但它不会起作用
答案 0 :(得分:0)
您可以将步骤定义更改为
Then user sees the monthly bankers report
并让步骤定义(代码)指定字符串。