Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antodata/pydesktopbrowserrecorder
This project allows you to record your desktop or the browser during an automated test using selenium's webdriver
https://github.com/antodata/pydesktopbrowserrecorder
browser-recorder desktop-recorder ffmpeg imageio python3 qa qa-automation qa-automation-tests screenshot selenium selenium-python selenium-webdriver test-automation test-automation-project testing-tools threading video video-recorder video-recording webdriver
Last synced: about 20 hours ago
JSON representation
This project allows you to record your desktop or the browser during an automated test using selenium's webdriver
- Host: GitHub
- URL: https://github.com/antodata/pydesktopbrowserrecorder
- Owner: AntoData
- Created: 2020-02-29T23:27:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-10T20:29:13.000Z (almost 3 years ago)
- Last Synced: 2024-11-14T11:07:53.919Z (about 20 hours ago)
- Topics: browser-recorder, desktop-recorder, ffmpeg, imageio, python3, qa, qa-automation, qa-automation-tests, screenshot, selenium, selenium-python, selenium-webdriver, test-automation, test-automation-project, testing-tools, threading, video, video-recorder, video-recording, webdriver
- Language: Python
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyDesktopBrowserRecorder
This project allows you to record your desktop or the browser during an automated test using selenium's webdriverTo 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