Those are browser automation tasks. Most of them can be done with Playwright/Puppeteer/Selenium.
I don't see why a browser should have to support AppleScript specifically. The Chrome DevTools Protocol and WebDriver BiDi are the standard protocols for interacting with browsers programmatically. Firefox supports WebDriver BiDi. Just use any tool that supports it, or talk to it directly. Maybe AppleScript can do that, I wouldn't know.
I don't see why a browser should have to support AppleScript specifically. The Chrome DevTools Protocol and WebDriver BiDi are the standard protocols for interacting with browsers programmatically. Firefox supports WebDriver BiDi. Just use any tool that supports it, or talk to it directly. Maybe AppleScript can do that, I wouldn't know.