diff --git a/document.md b/document.md index 3c9aeb7..766ead6 100644 --- a/document.md +++ b/document.md @@ -75,13 +75,21 @@ | ------ | ------ | ------ | ------ | | html | css选择器 | text/attr/outerhtml | attrName | - 获取a标签 -> ${selectors(resp.html,'a')} +```javascript +${selectors(resp.html,'a')} +``` - 获取a标签的text -> ${selectors(resp.html,'a','text')} +```javascript +${selectors(resp.html,'a','text')} +``` - 获取a标签的outerhtml -> ${selectors(resp.html,'a','outerhtml')} +```javascript +${selectors(resp.html,'a','outerhtml')} +``` - 获取a标签的href -> ${selectors(resp.html,'a','attr','href')} +```javascript +${selectors(resp.html,'a','attr','href')} +``` > selector返回的是String,selectors返回的是List @@ -92,9 +100,13 @@ | html | xpath | - 获取a标签 -> ${xpaths(resp.html,'//a')} +```javascript +${xpaths(resp.html,'//a')} +``` - 获取a标签的href属性 -> ${xpaths(resp.html,'//a/@href')} +```javascript +${xpaths(resp.html,'//a/@href')} +``` > xpath返回的是String,xpaths返回的是List @@ -105,7 +117,9 @@ | object | jsonpath | - 获取 **{"code" : 1}** 中code的值 -> ${jsonpath(resp.json,'$.code')} +```javascript +${jsonpath(resp.json,'$.code')} +``` #### regx/regxs @@ -114,5 +128,7 @@ | String | regx | - 获取页面标题 -> ${regxs(resp.html,'(.*?)')} +```javascript +${regxs(resp.html,'(.*?)')} +``` > regx返回的是String,regxs返回的是List