Skip to content

Commit

Permalink
Add example screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
tushuhei committed Apr 24, 2024
1 parent c8f3051 commit b9a53ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Sphinx extension to embed website screenshots.

![Example screenshot](https://raw.githubusercontent.com/tushuhei/sphinxcontrib-screenshot/main/example.png)

## Install

```bash
Expand Down Expand Up @@ -38,12 +40,12 @@ You can include a caption for the screenshot's `figure` directive.
:caption: This is a screenshot for www.example.com
```

You can describe the interaction that you want to have with the webpage before taking a screenshot. `page` is the [Playwright's Page instance](https://playwright.dev/docs/api/class-page).
You can describe the interaction that you want to have with the webpage before taking a screenshot in JavaScript.

```rst
.. screenshot:: http://www.example.com
page.get_by_role('link').click()
document.querySelector('button').click();
```


Expand Down
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b9a53ae

Please sign in to comment.