Attempting to run the script below in Selenium
result = driver.execute_script('let result; await axe.run().then((r)=> {result=r}); return result;')
Results in an error:
Javascript error: await is only valid in async function
Another attempt was made with the following code:
result = @driver.execute_async_script('(async() => {return await axe.run();})();')
However, it produced the error message:
Selenium::WebDriver::Error::ScriptTimeoutError: script timeout: result was not received in 30 seconds