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 webdriver = require('selenium-webdriver'), | |
By = webdriver.By, | |
until = webdriver.until; | |
const fs = require("fs"); | |
function takeScreenshot(driver, webElement, imagePath) { // driver -> webDriver; webElement -> WebElement; imagePath -> physical path to save the image | |
var base64Data = ""; | |
var location = {}; | |
var bulk = []; | |
driver.then(_ => { |
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
license: mit |