2022-08-26 20:57:46 +08:00
|
|
|
=== API
|
|
|
|
|
2022-08-28 20:08:22 +08:00
|
|
|
--- API test
|
2022-08-26 20:57:46 +08:00
|
|
|
|
|
|
|
goto 'http://www.eoapi.io/en'
|
|
|
|
|
|
|
|
find:
|
2022-08-28 20:08:22 +08:00
|
|
|
[select 'POST'] = method [input] = input [button 'Send'] = sendBtn
|
2022-08-27 16:53:02 +08:00
|
|
|
[label 'Headers'] = header
|
2022-08-26 20:57:46 +08:00
|
|
|
|
2022-08-28 20:08:22 +08:00
|
|
|
method -> 'GET'
|
2022-08-26 20:57:46 +08:00
|
|
|
input -> 'https://weibo.com/ajax/side/cards/sideInterested?count=60'
|
|
|
|
sendBtn -> click
|
2022-08-28 20:08:22 +08:00
|
|
|
wait 5000
|
|
|
|
|
|
|
|
find:
|
|
|
|
[label 'Response']=res
|
|
|
|
|
|
|
|
res -> click
|
|
|
|
|
|
|
|
# TODO 查看测试历史
|
|
|
|
|
|
|
|
capture
|
|
|
|
|
|
|
|
|
|
|
|
--- add New
|
|
|
|
|
|
|
|
goto 'http://www.eoapi.io/en'
|
|
|
|
|
|
|
|
find:
|
2022-08-30 09:44:51 +08:00
|
|
|
[input 'Search'] [button 'xpath:body > eo-root > eo-pages > div > div > div > eo-api > nz-layout > nz-sider > div > nz-content > nz-tabset > div > div > div.ant-tabs-tabpane.ant-tabs-tabpane-active.ng-star-inserted > div > eo-api-group-tree > header > div']=addBtn
|
2022-08-28 20:08:22 +08:00
|
|
|
|
|
|
|
addBtn -> hover
|
|
|
|
|
2022-08-28 22:05:21 +08:00
|
|
|
find:
|
|
|
|
[label 'New API']=newApi
|
|
|
|
[label 'New Group']
|
|
|
|
|
|
|
|
newApi -> click
|
|
|
|
|
|
|
|
find:
|
|
|
|
[button 'Save']=save
|
|
|
|
[select 'POST']=method [input '/']=path
|
2022-08-30 09:44:51 +08:00
|
|
|
[select 'Root directory'] [input 'xpath:#name']=name
|
|
|
|
[input 'xpath:body > eo-root > eo-pages > div > div > div > eo-api > nz-layout > nz-layout > nz-content > div > section > eo-api-edit-edit > div > nz-collapse:nth-child(3) > nz-collapse-panel > div.ant-collapse-content.ng-tns-c220-32.ant-collapse-content-active.ng-trigger.ng-trigger-collapseMotion > div > nz-tabset > div > div > div.ant-tabs-tabpane.ant-tabs-tabpane-active.ng-star-inserted > eo-api-edit-body > list-block-common-component > div > div.wrap_table_container_lbcc.had_select_drag_wrap_lbcc.drag_wrap_lbcc > div.tbody_div_wrap.ng-scope > div > inner-html-common-directive > div > div > div > div.td-tbd.va-top-td-tbd.depth-td-tdb.plr5.th_drag_2_lbcc.po_re.ng-scope > div > input']=paramName [input 'xpath:body > eo-root > eo-pages > div > div > div > eo-api > nz-layout > nz-layout > nz-content > div > section > eo-api-edit-edit > div > nz-collapse:nth-child(3) > nz-collapse-panel > div.ant-collapse-content.ng-tns-c220-32.ant-collapse-content-active.ng-trigger.ng-trigger-collapseMotion > div > nz-tabset > div > div > div.ant-tabs-tabpane.ant-tabs-tabpane-active.ng-star-inserted > eo-api-edit-body > list-block-common-component > div > div.wrap_table_container_lbcc.had_select_drag_wrap_lbcc.drag_wrap_lbcc > div.tbody_div_wrap.ng-scope > div > inner-html-common-directive > div > div > div > div.td-tbd.input-tbd.va-top-td-tbd.plr5.th_drag_5_lbcc.po_re.ng-scope > input']=desc [input 'xpath:body > eo-root > eo-pages > div > div > div > eo-api > nz-layout > nz-layout > nz-content > div > section > eo-api-edit-edit > div > nz-collapse:nth-child(3) > nz-collapse-panel > div.ant-collapse-content.ng-tns-c220-32.ant-collapse-content-active.ng-trigger.ng-trigger-collapseMotion > div > nz-tabset > div > div > div.ant-tabs-tabpane.ant-tabs-tabpane-active.ng-star-inserted > eo-api-edit-body > list-block-common-component > div > div.wrap_table_container_lbcc.had_select_drag_wrap_lbcc.drag_wrap_lbcc > div.tbody_div_wrap.ng-scope > div > inner-html-common-directive > div > div > div > div.td-tbd.input-tbd.va-top-td-tbd.plr5.th_drag_6_lbcc.po_re.ng-scope > input']=example
|
2022-08-28 22:05:21 +08:00
|
|
|
|
|
|
|
method -> 'GET'
|
|
|
|
# TODO path => '/api/data'
|
|
|
|
path -> 'api/data'
|
|
|
|
name -> 'yoo'
|
|
|
|
paramName -> 'a'
|
|
|
|
desc -> 'adesc'
|
|
|
|
example -> 'a Example'
|
|
|
|
save -> click
|
|
|
|
|
|
|
|
capture
|