get the fully loaded page screenshot in JPG format (PNG if in full resolution)

getScreenshotImage(server, testId, run = 1L, file = NULL,
  repeatView = FALSE, thumbnail = FALSE, fullResolution = FALSE,
  startRender = FALSE, documentComplete = FALSE, dryRun = FALSE, ...)

Arguments

server
A WebPagetest server
testId
test ID string
run
an integer. Which run number on a multiple runs test. Defaults to 1L.
file
Write the result returned to file. Defaults to NULL = don't write to file
repeatView
get the Repeat View (cached view) instead of default First View (primed cache). Defaults to FALSE
thumbnail
logical. Get the thumbnail of actual image. Defaults to FALSE
fullResolution
logical. get full resolution screenshot in PNG format if available. Defaults to FALSE.
startRender
logical. get the page screenshot at the Start Render point (i.e.: when something was first displayed on screen). Defaults to FALSE.
documentComplete
logical. get the page screenshot at the Document Complete point (i.e.: when window.onload was fired) Defaults to FALSE.
dryRun
If TRUE just return the RESTful API URL. Defaults to FALSE
...
Additonal function arguments

Value

If a file argument is given the JPG/PNG returned is written to file. Else a raster is returned via readJPEG|readPNG. If a file is not available when calling an argument (for example fullres, docComplete, ....) a HTTP 404 Not found error is returned.

Examples

## Not run: ------------------------------------ # WPT <- server() # history <- getHistory(WPT, filter = "London") # tID <- as.character(history[dim(history)[1], "Test ID"]) # screenshot <- getScreenshotImage(WPT, tID) ## ---------------------------------------------