Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Duplicating / Syncing 2 Browsers

Post Reply
andy.t
Posts: 8
Joined: Sun Feb 23, 2020 9:00 pm

Duplicating / Syncing 2 Browsers

Post by andy.t »

Hi - Sorry for my lack of CEF understanding (novice!) I'm using CEF 4 pretty much successfully in a project. However I would ideally like to simulate 2 browsers side by side. Is this possible . For example browser one mouse over will perform the same mouse over on browser 2 even if browser 1 and browser 2 are different window sizes. Mouse clicks and Key presses also need to be duplicated in the relevant places/html fields. I would also like the reverse to be possible so if a key press/event in browser 2, browser 1 will update / simulate the same functionality.

I know this sounds an odd request, but it would really help me to achieve my goal.

Thanks.
#Andy.
User avatar
salvadordf
Posts: 4042
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Duplicating / Syncing 2 Browsers

Post by salvadordf »

Hi,

If the 2 browsers have different resolution then they might render the page differently. Every HTML element could have different coordinates and sizes.

Replicating raw mouse and keyboard events is only possible if the browsers have identical contents. In this case you wouldn't be able to do that.

You would have to find the HTML element bellow the mouse cursor when you click the mouse button. Then find the same element in the second browsers, simulate the mouse movement to that element (it will have a different trajectory than the first browser) and then simulate a click event.
You would have to do something similar for keyboard events.

It's not impossible to do all this but it requires some effort.
andy.t
Posts: 8
Joined: Sun Feb 23, 2020 9:00 pm

Re: Duplicating / Syncing 2 Browsers

Post by andy.t »

I've decided to abandon this as it's not really worth the effort. I have a more elegant solution to what I want to ultimately achieve so I'll opt for that instead. Many thanks for your work and prompt reply.

Regards,
Andy/
Post Reply