Code Monkey home page Code Monkey logo

screenrecorder's Introduction

ScreenRecorder

A class that allows screen recording of Selenium in Python.

Sometimes debugging an issue using only screenshots can be difficult. While there are powerful libraries like ffmpeg for video recording, what if you are running a scheduled Selenium test on a remote desktop headlessly? From my experience, headless execution is difficult to record. This is a rudimentary library to help with debugging, and will not return the steadiest video stream, but it will return a functional one.

It works by polling screenshots from the Selenium WebDriver in the background in its own thread, returning them as bytes. When the recording is halted, the bytes are written to a temporary location on disk as images, and then fed into a VideoWriter object, with the temporary images deleted thereafter.

Note

Specifying frames per second is not feasible for now, as you would have to poll for a screenshot every (60/n) seconds (where is n is the specified frames per second), which is too intensive with this model.

screenrecorder's People

Contributors

pjsoconnell avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.