|
10 | 10 | from selenium_browser_desktop_recorder import SeleniumBrowserRecorder |
11 | 11 |
|
12 | 12 | Then you create a SeleniumBrowserRecorder object, you have two modes. |
| 13 | + |
13 | 14 | First mode: |
14 | 15 |
|
15 | 16 | obj = SeleniumBrowserRecorder(folder,encoding) |
| 17 | + |
16 | 18 | - folder: Folder where we want to create the folder that will contain the videos for our recording session |
17 | 19 | - encoding: Encoding of the video. We only assure that using ".mp4" will work |
18 | 20 | This way, when you start the recording session, the desktop will be recorded until we stop the recording session |
19 | 21 |
|
20 | 22 | But you can also provide a third parameter: |
| 23 | + |
21 | 24 | obj = SeleniumBrowserRecorder(folder,encoding,driver) |
22 | 25 | - driver: A webdriver object |
23 | | - In this case, we will record only the browser window(s) that are being controlled by that webdriver object |
| 26 | + |
| 27 | + In this case, we will record only the browser window(s) that are being controlled by that webdriver object |
24 | 28 |
|
25 | 29 | To start the recording session once we build the object we only have to use this method: |
26 | | - obj.startRecordingSession() |
| 30 | + |
| 31 | + obj.start_recording_session() |
| 32 | + |
27 | 33 | And our object will start recording in a parallel thread |
28 | 34 |
|
29 | 35 | To stop the recording session we only have to: |
30 | | - obj.stopRecordingSession() |
| 36 | + |
| 37 | + obj.stop_recording_session() |
| 38 | + |
31 | 39 | The video will be saved and the threads finished |
32 | 40 |
|
33 | 41 | 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 |
|
0 commit comments