Skip to main content

Module to record videos of an automation session using Selenium webdriver or the desktop.

Project description

PyDesktopBrowserRecorder

This project allows you to record your desktop or the browser during an automated test using selenium's webdriver

To install it, just open a terminal and execute:

pip install pydesktopbrowserrecorder

PiPY Project: https://pypi.org/project/pydesktopbrowserrecorder/

Once installed, you just have to make the following import:

from selenium_browser_desktop_recorder import SeleniumBrowserRecorder

Then you create a SeleniumBrowserRecorder object, you have two modes.

First mode:

obj = SeleniumBrowserRecorder(folder,encoding)

  • folder: Folder where we want to create the folder that will contain the videos for our recording session
  • encoding: Encoding of the video. We only assure that using ".mp4" will work This way, when you start the recording session, the desktop will be recorded until we stop the recording session

But you can also provide a third parameter:

obj = SeleniumBrowserRecorder(folder,encoding,driver)

  • driver: A webdriver object

    In this case, we will record only the browser window(s) that are being controlled by that webdriver object

To start the recording session once we build the object we only have to use this method:

obj.start_recording_session()

And our object will start recording in a parallel thread

To stop the recording session we only have to:

obj.stop_recording_session()

The video will be saved and the threads finished

NOTE: If we are recording a browser and the size of it changes, we will stop the current video and start a new one with the new size of the window

NOTE: This was developed using the following versions of the following external libraries:

  • imageio_ffmpeg = 0.4.5
  • numpy~=1.22.2
  • imageio==2.15.0
  • PyAutoGUI~=0.9.53
  • selenium~=4.1.0
  • Pillow~=9.0.1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydesktopbrowserrecorder-0.0.6.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydesktopbrowserrecorder-0.0.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pydesktopbrowserrecorder-0.0.6.tar.gz.

File metadata

  • Download URL: pydesktopbrowserrecorder-0.0.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pydesktopbrowserrecorder-0.0.6.tar.gz
Algorithm Hash digest
SHA256 44d1827090211a5f57cd5952454e4b4189a80588ded089faffa712d7013f51f1
MD5 8d5508138d56bbcc10c645ada378c34b
BLAKE2b-256 1c98fef87d8a69f8ca993e66d1a86f8e3ec7b84fbdaaa203e9b8fadd91e9d904

See more details on using hashes here.

File details

Details for the file pydesktopbrowserrecorder-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pydesktopbrowserrecorder-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pydesktopbrowserrecorder-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d7d7f87198ef11b766aca99a2fa56f0aa34a679058e6fc1269483133cc4602e6
MD5 ce36783cb20325ead1cb5774d0544165
BLAKE2b-256 aaf21fbef26792dec13a8084527da2edf3c093be172a3c0e1521127817c91f3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page