Replace `with` (deprecated) usage with `browser.evaluate`