Keyboard Maestro can control Safari (or Safari-like browsers like Safari Technology Preview) or Google Chrome (or Chrome-like browsers like Chrome Canary) using Browser Window Actions or Browser Form Actions.
Automation control is configured in the System Preferences, Security & Privacy, Automation settings. The browser should be listed with Keyboard Maestro Engine able to control it (checked).
The system should ask to allow Automation control the first time you execute an action to control the browser. At that point, it should also add Keyboard Maestro Engine.app to the preference settings, so you can enable it late.