Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording more than one window (parallel executions) #83

Open
Rajagopalan-M opened this issue Jan 20, 2020 · 8 comments
Open

Recording more than one window (parallel executions) #83

Rajagopalan-M opened this issue Jan 20, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@Rajagopalan-M
Copy link

Rajagopalan-M commented Jan 20, 2020

As I have already informed you, I am recording more than one windows here.

I just rearranged the code to take each window per recorder like shown below

recorders= ["one.exe", "two.exe", "three.exe", "four.exe", "five.exe"]

From this array, when every window opens, my program picks up one recorder for one window, Like

      ScreenRecorder.ffmpeg_binary = File.expand_path("VideoRecorder/#{recorder}")

But still it's not recording properly, the video is not continuously running, it stops at the first page and then suddenly, five page is coming. Do you have any clue as to why it happens?

@kapoorlakshya
Copy link
Owner

@Rajagopalan-M Can you share more of your code so I can reproduce this locally?

@Rajagopalan-M
Copy link
Author

Rajagopalan-M commented Jan 22, 2020

@kapoorlakshya

Hi, it's simple, Just run the automation in 5 browser simultanously and record all the window, this happens. For an example,

a=[]
5.times do
a<<Thread.new do
require 'watir'
recorder = ScreenRecorder::Window.new(title: ScreenRecorder::Titles.fetch('chrome').last........
recorder.start
b.goto "you url"
"your code here(make atleast 30 lines of code, so that you can record and see)"
end
end

a.each(&:join)

@kapoorlakshya
Copy link
Owner

@Rajagopalan-M Thanks!

the video is not continuously running, it stops at the first page and then suddenly, five page is coming.

Do you have a different output file for each of the browser sessions?

@Rajagopalan-M
Copy link
Author

Rajagopalan-M commented Jan 22, 2020

Yes, 5 browsers are being recorded at the same time and it saves 5 files. If you still want an perfect example, I will automate my electricity bill payment flow and give you for your reference. Your video recording software perfectly works for sequential execution but it is not working for parallel execution. If you include this option, then it would be great.

@kapoorlakshya
Copy link
Owner

Yeah, it'll be nice to record parallel test executions.

Can you explain the following behavior a bit more?

it stops at the first page and then suddenly, five page is coming.

@kapoorlakshya kapoorlakshya changed the title Recording more than one window Recording more than one window (parallel executions) Jan 22, 2020
@kapoorlakshya kapoorlakshya added the enhancement New feature or request label Jan 22, 2020
@Rajagopalan-M
Copy link
Author

Video is moving but you can see only the first page in the video and after such a long time, suddenly last page shows up and then video ends there.

@kapoorlakshya
Copy link
Owner

Got it. I have an idea how to implement support for this, but will need to experiment before I can promise anything.

@Rajagopalan-M
Copy link
Author

sure thing! Thank you very much for taking this forward

@kapoorlakshya kapoorlakshya added this to the v1.5.0 milestone Jan 30, 2020
@kapoorlakshya kapoorlakshya removed this from the v1.5.0 milestone Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants