首页 > 解决方案 > 如何获取机器人框架中url的html源代码?

问题描述

robotsframework 中的关键字,用于获取网页 url 的 html 源代码

设置

Library   RequestsLibrary
Library  HttpLibrary.HTTP


使用 requests 库的测试用例示例

${response} =  Get  http://192.168.1.254/cgi-bin/home.ha
log  ${response.content}

标签: robotframework

解决方案


${myHtml} =    Get Source

这应该适用于 HTML 网页及其来源。http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source


推荐阅读