O'Reilly logo

Selenium Testing Tools Cookbook by Unmesh Gundecha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automating the HTML5 video player

Up till now, there has not been a standard for showing a video on web pages. Most of the browsers depend on a plugin such as Flash to playback a video. However, different browsers have different plugins.

HTML5 defines a new element that specifies a standard way to embed a video or movie clips on a web page by using the <video> element. Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the <video> element.

In this recipe, we will explore how we can automate testing of the <video> element, which provides a JavaScript interface with various methods and properties for automation.

How to do it...

We will create a new test named testHTML5VideoPlayer for testing the <video> element. We will use the JavaScriptExecutor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required