Created
June 12, 2022 05:12
-
-
Save emilhein/e163f40a5ac5599c3313f5457e4e61dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readGlobalVar = async ({ page }) => { | |
try { | |
let variable = await page.evaluate(() => window.myVaraible) | |
return variable | |
} catch (error) { | |
return Promise.reject(error) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment