如何在空手道功能文件中转义'('



我正在尝试在我的功能文件中做一个断言,我的预期值是'('

是否有要在功能文件中使用的转义字符。我使用"\"作为转义字符,但没有运气

空手道功能文件声明:

And match response ProcessCustomer/header/status/description == 'Successful(EFT Payment)'

得到以下错误:

com.intuit.karate.exception.KarateException: ESB_PaymentCardPayment.feature:20 - syntax error, expected '==' for match

如果我使用"包含"而不是"==",则相同的语句有效

你一定错过了什么,也许先将XML值解压缩到一个字符串中,然后再试一次。字符串没有特殊行为,请尝试以下两行并查看其工作情况:

* def test = 'Successful(EFT Payment)'
* match test == 'Successful(EFT Payment)'
* def xml = <root>Successful(EFT Payment)</root>
* match xml/root == 'Successful(EFT Payment)'

最新更新