Skip to content

Commit 4bbddc9

Browse files
authored
Update README.md
1 parent b3056b4 commit 4bbddc9

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
11
# PyDesktopBrowserRecorder
22
This project allows you to record your desktop or the browser during an automated test using selenium's webdriver
3+
4+
You just have to make the following import:
5+
from videoRecorder import desktopBrowserRecorder
6+
7+
Then you create a DesktopBrowserRecorder object, you have two modes. You have to provide the following parameters:
8+
obj = desktopBrowserRecorder.DesktopBrowserRecorder(folder,encoding)
9+
- folder: Folder where we want to create the folder that will contain the videos for our recording session
10+
- encoding: Encoding of the video. We only assure that using ".mp4" will work
11+
This way, when you start the recording session, the desktop will be recorded until we stop the recording session
12+
13+
But you can also provide a third parameter:
14+
obj = desktopBrowserRecorder.DesktopBrowserRecorder(folder,encoding,driver)
15+
- driver: A webdriver object
16+
In this case, we will record only the browser window(s) that are being controlled by that webdriver object
17+
18+
To start the recording session once we build the object we only have to use this method:
19+
obj.startRecordingSession()
20+
And our object will start recording in a parallel thread
21+
22+
To stop the recording session we only have to:
23+
obj.stopRecordingSession()
24+
The video will be saved and the threads finished
25+
26+
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
27+
size of the window
28+
29+
Also, in the package config we include the module checkConfiguration.py:
30+
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
31+
32+
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.
33+

0 commit comments

Comments
 (0)