* {{> saveElementScreenshot }} *
(locator, fileName)
| 1982 | * |
| 1983 | */ |
| 1984 | async saveElementScreenshot(locator, fileName) { |
| 1985 | const outputFile = screenshotOutputFolder(fileName) |
| 1986 | |
| 1987 | const res = await this._locate(withStrictLocator(locator), true) |
| 1988 | assertElementExists(res, locator) |
| 1989 | const elem = usingFirstElement(res) |
| 1990 | |
| 1991 | this.debug(`Screenshot of ${new Locator(locator)} element has been saved to ${outputFile}`) |
| 1992 | return elem.saveScreenshot(outputFile) |
| 1993 | } |
| 1994 | |
| 1995 | /** |
| 1996 | * {{> saveScreenshot }} |
nothing calls this directly
no test coverage detected