V
V
vbNoName2018-11-14 15:58:40
Java
vbNoName, 2018-11-14 15:58:40

How to record video using Java Selenium?

The site has an animation block, which is animated using html5, css, and js. Is there a way to convert this animation to gif? I am using selenium and getScreenshotAs method. Initially, the idea was this: to make a bunch of screenshots, and then blind them into a gif file, but the problem is that using the getScreenshotAs method, a screenshot is taken for a very long time (350-400ms), so there is no smoothness (it turns out 3-4 frames per second, and even less). The question is, is it possible to solve this problem somehow, if not, then maybe there is some other way? Screen recording options will not work, because this will all be done on the server, without a gui.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-11-15
@zolt85

At one time, when writing tests for the UI through Selenium, I used such a thing as TestContainers . This is such a wrapper with which you can run Selenium tests inside a docker container. So these TestContainers raise a VNC server inside the container and write everything that happens inside, giving out a movie after the test is completed, which can be viewed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question