Skip to main content

This project allows you to record your desktop or a browser controlled by Selenium

Project description

PyDesktopBrowserRecorder

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

You just have to make the following import: from videoRecorder import desktopBrowserRecorder

Then you create a DesktopBrowserRecorder object, you have two modes. You have to provide the following parameters: obj = desktopBrowserRecorder.DesktopBrowserRecorder(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 = desktopBrowserRecorder.DesktopBrowserRecorder(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.startRecordingSession() And our object will start recording in a parallel thread

To stop the recording session we only have to: obj.stopRecordingSession() 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

Also, in the package config we include the module checkConfiguration.py: This module contains the method checkConfiguration() that reads the file importedModules.txt in the same folder and checks the modules listed in every line of this file have been installed in our environment. These modules are needed to run this project successfully. In case one is not installed, the function will tell you how to install it. Also, the module calls this function so you would only have to run this module, but you could also call this function from your program if needed

Also we have a folder test that includes a module called demo.py that you can run to see how this works and how this was tested.

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

  • imageio_ffmpeg = 0.4.1
  • imageio = 2.5.0
  • selenium = 3.141.0
  • pyautogui = 0.9.48

Project details


Release history Release notifications

This version

0.0.1

Download files

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

Files for ingov, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size ingov-0.0.1-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ingov-0.0.1.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page