Robotframework 如何在robot框架中获取url的html源代码?

Robotframework 如何在robot框架中获取url的html源代码?,robotframework,Robotframework,robotframework中的关键字用于获取web url的html源代码 背景 Library RequestsLibrary Library HttpLibrary.HTTP 测试用例 使用请求库的示例 ${response} = Get http://192.168.1.254/cgi-bin/home.ha log ${response.content} 这应该适用于HTML网页及其源代码 你的问题是?这个例子确实展示了如何获取响应文本——可能是html;如果您将关键字

robotframework中的关键字用于获取web url的html源代码

背景

Library   RequestsLibrary
Library  HttpLibrary.HTTP
测试用例
使用请求库的示例

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

这应该适用于HTML网页及其源代码

你的问题是?这个例子确实展示了如何获取响应文本——可能是html;如果您将关键字更改为其实际名称
Get Request
,看起来您都已设置好。当涉及selenium时,这是正确的关键字,但OP正在发出Get请求-例如处理原始http数据。
${myHtml} =    Get Source