Created
June 13, 2019 07:39
-
-
Save dstyle0210/099973ecacd240cb744e56a0a87aecb6 to your computer and use it in GitHub Desktop.
[selenium-webdriver] takeScreenshot
This file contains hidden or 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
| driver.takeScreenshot().then(function(data){ | |
| var base64Data = data.replace(/^data:image\/png;base64,/,"") | |
| fs.writeFile("파일명.png", base64Data, 'base64', function(err) { | |
| if(err) console.log(err); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment