Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->86.0.4238.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit 14.0 | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->80.0b8<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->88.0.4324.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->14.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->83.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Headless execution is supported for all browsers on all platforms.

Expand Down
2 changes: 2 additions & 0 deletions scripts/update_api.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

python scripts/update_versions.py

function update_api {
echo "Generating $1"
file_name="$1"
Expand Down
15 changes: 15 additions & 0 deletions scripts/update_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import re
from playwright import sync_playwright

with sync_playwright() as p:
r = open("README.md", "r")
text = r.read()
for browser_type in [p.chromium, p.firefox, p.webkit]:
rx = re.compile(r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->")
browser = browser_type.launch()
text = rx.sub(f"<!-- GEN:{browser_type.name}-version -->{browser.version}<!-- GEN:stop -->", text)
browser.close()

w = open("README.md", "w")
w.write(text)
w.close()