robotframework - 如何获取机器人框架中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}
解决方案
${myHtml} = Get Source
这应该适用于 HTML 网页及其来源。http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source
推荐阅读
- mysql - 如何在laravel中为mysql执行外连接
- java - 堆外内存是 Java/JVM 标准吗?
- javascript - jQuery防止在if语句中提交表单
- java - stderr 和 stdout 被 testcontainers-java 中的换行符随机中断
- php - Wordpress 查询 var 's' 在页面上使用时会导致 404 错误
- c++ - string.h 中的索引声明被 cJSON.h 所掩盖
- virtual-machine - 如何将安全令牌移交给虚拟机?
- python - 使用 statsmodel 从 MANOVA 测试结果中仅提取 p 值
- swift - 未达到 TableView 中的配置
- crystal-reports - SAP CMC 中的计划失败后如何获取电子邮件通知