Gets a object representing the image of the page on the screen. A object containing the image.
()
| 353 | /// </summary> |
| 354 | /// <returns>A <see cref="Screenshot"/> object containing the image.</returns> |
| 355 | public Screenshot GetScreenshot() |
| 356 | { |
| 357 | Response screenshotResponse = this.Execute(DriverCommand.Screenshot, null); |
| 358 | |
| 359 | screenshotResponse.EnsureValueIsNotNull(); |
| 360 | string base64 = screenshotResponse.Value.ToString()!; |
| 361 | return new Screenshot(base64); |
| 362 | } |
| 363 | |
| 364 | /// <summary> |
| 365 | /// Gets a <see cref="PrintDocument"/> object representing a PDF-formatted print representation of the page. |