takeScreenshot: takeScreenshot

Description Usage Arguments Value See Also Examples

Description

takeScreenshot

Usage

1
2
3
takeScreenshot(remDr, file = NULL,
  display = getOption("seleniumPipes_display_screenshot"),
  useViewer = !is.null(getOption("viewer")), returnPNG = FALSE, ...)

Arguments

remDr

An object of class "rDriver". A remote driver object see remoteDr.

file

If not null the decoded PNG is written to file using the string provided here. Defaults to NULL.

display

logical Display the PNG or not (default is set in getOption("seleniumPipes_display_screenshot")).

useViewer

A viewer to view the PNG. Looks for the RSudio viewer by default.

returnPNG

logical return the decoded PNG. If false (default) remDr is returned to allw chaining.

...

Additonal function arguments - Currently passes the retry argument.

Value

If returnPNG is FALSE the remote Driver object is returned and additonal chaining is possible. If TRUE then the decoded base64 image is returned see base64_dec

See Also

Other screenCapture functions: takeElementScreenshot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  remDr <- remoteDr()
  remDr %>% go("http://www.google.com/ncr")
  remDr %>% takeScreenshot

  # select the search box
  searchElem <- remDr %>% findElement("name", "q")
  #searchElem %>% takeElementScreenshot()

## End(Not run)

seleniumPipes documentation built on May 2, 2019, 5:57 a.m.