Is there an in-browser E2E testing framework? [closed]

I recently saw unit tests for a basic JS lib (called “t”) running in the browser and wondered if it would be possible to run end-to-end (UI) tests in the same way.

Is there a framework (similar to Chrome’s F12 Recorder) which allows us to run scripts inside our web application’s browser context?

Ideally we would just add a <script> tag to reference the framework and then one or more <script> tags which run stuff like:

click('#someElement');
let res = await element('#someOtherElement');
assert(res.getAttribute('foo'), 'bar');

Note: Although QUnit does provide DOM plugins, it is explicitly a unit testing framework and I want to test my entire app in the browser.