Screenshot 同样为 Robot Framework 标准类库,我们只将它提供的其它中一个关键字“TakeScreenshot”,它用于截取到当前窗口。

1、导入Screenshot 类

虽然 Screenshot也为 Robot Framework 标准类库,但它默认不会加载,需要手动加载这个库。

Robot Framework学习笔记(四)------Screenshot 库屏幕截图

2、编写用例

使用“Take Screenshot”关键字实现截取当前屏幕

Robot Framework学习笔记(四)------Screenshot 库屏幕截图

 

 3、运行结果

运行之后查看log.html文件

Robot Framework学习笔记(四)------Screenshot 库屏幕截图

 

相关文章:

  • 2021-10-29
  • 2021-12-24
  • 2021-07-14
  • 2021-11-03
  • 2021-12-05
  • 2021-08-04
  • 2022-12-23
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2022-01-25
  • 2021-11-16
  • 2021-07-02
  • 2021-06-15
  • 2021-05-23
相关资源
相似解决方案