如何在 selenium-webdriver 中处理视频?

发布于 2024-11-12 17:07:04 字数 95 浏览 0 评论 0原文

我有一些视频,我想用自动化测试它们。

您能告诉一下,selenium-webdriver 如何处理视频吗?

它如何识别它?

I have some videos and I want to test their with automation.

Could you tell, how does selenium-webdriver work with video?

How does it recognize it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

〆一缕阳光ご 2024-11-19 17:07:04

Selenium 可以测试视频 DOM 中是否存在正确的元素。您将无法真正使用 Selenium 与视频进行交互。您可能需要记录网络流量以检查相关项目是否正在下载或是否出现 404 错误。

Selenium can test if the correct elements are in the DOM for video. You won't really be able to interact with the video with Selenium. You many need to record the network traffic to check the relevant items are being downloaded or if they 404.

隐诗 2024-11-19 17:07:04

我使用 WebdriverJS 点击 youtube 视频。

我测试了以下方法并发现它们有效。

.click("#videoid")
.click("iframe:hover")
.click(".classname")

这当然有点令人惊讶,因为 Selenium 不应该与闪存一起工作......

I use WebdriverJS to click on youtube video.

I have tested the methods below and found them to work.

.click("#videoid")
.click("iframe:hover")
.click(".classname")

This of course is a little surprising as Selenium is not supposed to work with flash...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文