Screenshots#
Save what the app is showing as an image file, for example to attach to a test report when a test fails.
Each command shows its signature and an example in every language; pick a language in any tab and the others switch with it.
Screenshot#
GetPNGScreenshot#
Saves a screenshot of the app’s screen as a PNG file, on the machine that runs the tests.
void GetPNGScreenshot(string path)
Example
// Save what the app shows when a test fails, to attach it to the report.
altDriver.GetPNGScreenshot("failure.png");
void getPNGScreenshot(String path)
Example
// Save what the app shows when a test fails, to attach it to the report.
altDriver.getPNGScreenshot("failure.png");
alt_driver.get_png_screenshot(path)
Example
# Save what the app shows when a test fails, to attach it to the report.
alt_driver.get_png_screenshot("failure.png")
Get Png Screenshot path
Example
# Save what the app shows when a test fails, to attach it to the report.
Get PNG Screenshot failure.png
Parameters
Name |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Where to save the file, on the machine that runs the tests. A relative path is relative to the tests’ working folder. An existing file is overwritten. |
Returns
Nothing.