You can return the result of the script:
browser.evaluate_script("4+4") == 8
Some text input actions cannot be “typed” thru
browser.fill(), like new lines and tab characters. Below is en example how to work around this using
browser.execute_script(). This is also much faster than
browser.fill() as there is no simulated key typing delay, making it suitable for longer texts.