如何在 Selenium webdriver 中录制视频 [英] How to record a video in Selenium webdriver

查看:94
本文介绍了如何在 Selenium webdriver 中录制视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有每天晚上运行的自动化脚本(大约 350 个脚本或测试用例).我想录制每个测试用例(Python 脚本)的视频.有没有一种工具或方法可以让我分别控制每个测试用例的视频录制?

I have automated scripts that run every night (around 350 scripts or testcases). I want to record a video of each test case (Python scripts). Is there a tool or way that I can use to control video recording for each test case separately?

例如,在测试用例设置期间开始录制,在拆卸期间停止录制并使用指定的名称和日期在本地保存视频.所以我应该为每个测试用例准备 350 个视频(最好只保存失败测试用例的视频).

For instance, during a test case setup start recording and during teardown stop recording and save the video locally with a specified name and date. So I should have 350 videos for each testcase (more preferably save only videos for the failed test cases).

有没有办法将此功能集成到我用于设置和拆卸的代码中?

Is there a way of integrating this functionality in the code I use for my setups and teardowns?

推荐答案

一个简单的webdriver没有录制视频的功能;您需要使用第三方库,例如 Castro.

A simple webdriver has no function to record video; you need to use a third-party library, like Castro.

对于 Java 网络驱动程序,请查看博客文章 Java Webdriver 脚本的屏幕录制(视频).

For a Java webdriver, look at blog post Screen Recording (Video) of Java Webdriver script.

这篇关于如何在 Selenium webdriver 中录制视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆