object capture
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
capture
^
capture to "MyScreenshot.png"
^
- Source
- WebBrowser.scala
- Alphabetic
- By Inheritance
- capture
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
apply()(implicit driver: WebDriver): File
Capture screenshot and save it in capture directory, which by default is system property's java.io.tmpdir.
Capture screenshot and save it in capture directory, which by default is system property's java.io.tmpdir. You can change capture directory by calling
setCaptureDir
-
def
to(fileName: String)(implicit driver: WebDriver): Unit
Capture screenshot and save it as the specified name (if file name does not end with .png, it will be extended automatically) in capture directory, which by default is system property's java.io.tmpdir.
Capture screenshot and save it as the specified name (if file name does not end with .png, it will be extended automatically) in capture directory, which by default is system property's java.io.tmpdir. You can change capture directory by calling
setCaptureDir
- fileName
screenshot file name, if does not end with .png, it will be extended automatically