Description Usage Arguments Value Examples
get the fully loaded page screenshot in JPG format (PNG if in full resolution)
1 2 3 |
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 |
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.
1 2 3 4 5 6 7 | ## Not run:
WPT <- server()
history <- getHistory(WPT, filter = "London")
tID <- as.character(history[dim(history)[1], "Test ID"])
screenshot <- getScreenshotImage(WPT, tID)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.