@JRSF-Home
Think script worked pretty well for me. It does something similar to your use-case. It opens a Youtube video in a new Chrome window in a specific location on the screen, with specific dimensions, and presses the Like button.
It uses a Chrome dev tools console command to find the like button and click it.
"C:\Program Files\Google\Chrome\Application\chrome.exe" --new-window https://www.youtube.com/watch?v=1I9qC0Zo_PM
timeout 4
REM x y width height
nircmd win setsize stitle "Allow friends to control Spotify" 200 100 800 1000
nircmd win activate stitle "Allow friends to control Spotify"
REM open dev tools
nircmd sendkeypress F12
timeout 3
REM type document.querySelector('like-button-view-model button[aria-label*="like"]').click()
nircmd sendkeypress d o c u m e n t 0xBE q u e r y Shift+s e l e c t o r Shift+0x39 0xDE l i k e 0xBD b u t t o n 0xBD v i e w 0xBD m o d e l spc b u t t o n 0xDB
nircmd sendkeypress a r i a 0xBD l a b e l Shift+0x38 0xBB Shift+0xDE l i k e Shift+0xDE 0xDD 0xDE Shift+0x30 0xBE c l i c k Shift+0x39 Shift+0x30
REM press enter
nircmd sendkeypress 0x0D
timeout 1
REM close dev tools
nircmd sendkeypress F12
It's a little low-tech because it simulates a lot of key presses. There's probably a better way using puppeteer or selenium but this works if you don't care.