is not very clear to me the difference between execute_script and execute_async_script in selenium.
given this example in python-selenium, into a pytest function:
driver.get(url)
js = '''
var video = document.getElementById("myVideo");
video.onplaying=function() {
return "play";
};
'''
video_play = driver.execute_script(js)
assert video_play == "play"
the result is:
E AssertionError: assert None == 'play'
what am i missing? should i use execute_async and an async/await function in js? could you point me at some examples?