【发布时间】:2020-02-04 01:10:58
【问题描述】:
我在将我的响应错误与 html 匹配时遇到问题。
我试过这样
- 匹配 $.errors == '#present'
- 匹配 $.errors == 响应
错误:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Error: Unexpected object!</pre>
</body>
</html>
我这样做,scnario会停止!
When method post
* if (responseStatus == 500 ) karate.abort()
Then status 200
* match $.errors == '#notpresent'
如何将响应匹配为 html 文本?
【问题讨论】:
标签: karate