在Assertion中获取Response的headers,获取headers中信息,获取body(content)

// get the  headers of the request
def content= messageExchange.getResponseContent()
def headers = messageExchange.getResponseHeaders()
log.info headers

//get the Content-Type of the headers
def contentType= headers["Content-Type"][0]
log.info contentType

log.info content.contains("<error")

上一篇:python中set和frozenset方法和区别


下一篇:js对select动态添加和删除OPTION