Skip to content

Commit

Permalink
Improved clipboard example
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Dec 6, 2022
1 parent bd933a9 commit 2f5042f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,15 @@ More details: https://aerokube.com/selenoid/latest/#_downloading_files_from_brow

#### Accessing clipboard

Selenoid can return the content of the clipboard of your browser session.
Selenoid can read and update the the content of the clipboard of your browser session.

````java
WebDriver driver = WEB_DRIVER_MANAGER.getWebDriver();
SessionContext sessionContext = WEB_DRIVER_MANAGER.getSessionContext(driver).get();
String clipboard = SelenoidHelper.get().getClipboard(sessionContext);
...
String value = "My new clipboard content.";
SelenoidHelper.get().setClipboard(sessionContext, value);
````

More details: https://aerokube.com/selenoid/latest/#_accessing_clipboard
Expand Down

0 comments on commit 2f5042f

Please sign in to comment.