Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 19a929f

Browse files
authored
Update Screenshot.java
Update documentation to reflect the change made to the code.
1 parent d7b4d2f commit 19a929f

File tree

1 file changed

+3
-1
lines changed
  • src/main/java/com/github/markusbernhardt/seleniumlibrary/keywords

1 file changed

+3
-1
lines changed

src/main/java/com/github/markusbernhardt/seleniumlibrary/keywords/Screenshot.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public String setScreenshotDirectory(String path) {
5454

5555
@RobotKeyword("Take a screenshot of the current page and embed it into the log.\r\n" +
5656
"\r\n" +
57-
"The ``filename`` argument specifies the name of the file to write the screenshot into. If no filename is given, the screenshot is saved into file selenium-screenshot-<counter>.png under the directory where the Robot Framework log file is written into. The filename is also considered relative to the same directory, if it is not given in absolute format.\r\n" +
57+
"The ``filename`` argument specifies the name of the file to write the screenshot into. If no filename is given, the screenshot is saved into file selenium-screenshot-{index}.png under the directory where the Robot Framework log file is written into. The filename is also considered relative to the same directory, if it is not given in absolute format.\r\n" +
5858
"\r\n" +
59+
"if ``filename`` contains marker {index}, it will be automatically replaced with unique running index preventing files to be overwritten. Indices start from 1.\r\n" +
60+
"\r\n" +
5961
"A CSS can be used to modify how the screenshot is taken. By default the background color is changed to avoid possible problems with background leaking when the page layout is somehow broken.")
6062
@ArgumentNames({ "filename=NONE" })
6163
public void capturePageScreenshot(String...params) {

0 commit comments

Comments
 (0)