我正在用Selenium编写一个功能文件,其中1个表壳有一个撇号。运行测试用例时,Cucumber 报告出现无法将"'"转换为有效字符。像这样:
Then user sees the following title
|Banker's report for this month|
我将如何解决这个问题?我试过了
|Banker's report for this month|
但它行不通
您可以将步骤定义更改为类似
Then user sees the monthly bankers report
并让步骤定义(即代码)指定字符串。