[package]
edition = "2024"
rust-version = "1.85"
name = "playwright-rs"
version = "0.9.0"
authors = ["Paul Adamson"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust bindings for Microsoft Playwright"
readme = "README.md"
keywords = [
"playwright",
"browser",
"automation",
"testing",
"e2e",
]
categories = [
"development-tools::testing",
"web-programming",
]
license = "Apache-2.0"
repository = "https://github.com/padamson/playwright-rust"
resolver = "2"
[package.metadata.docs.rs]
toolchain = "nightly-2025-05-01"
[features]
default = ["native-tls"]
native-tls = ["tokio-tungstenite/native-tls"]
rustls-tls-native-roots = ["tokio-tungstenite/rustls-tls-native-roots"]
rustls-tls-webpki-roots = ["tokio-tungstenite/rustls-tls-webpki-roots"]
[lib]
name = "playwright_rs"
path = "src/lib.rs"
doctest = false
[[example]]
name = "actions"
path = "examples/actions.rs"
[[example]]
name = "assertions"
path = "examples/assertions.rs"
[[example]]
name = "basic"
path = "examples/basic.rs"
[[example]]
name = "browser_lifecycle"
path = "examples/browser_lifecycle.rs"
[[example]]
name = "connect_over_cdp"
path = "examples/connect_over_cdp.rs"
[[example]]
name = "downloads_dialogs"
path = "examples/downloads_dialogs.rs"
[[example]]
name = "evaluate_typed"
path = "examples/evaluate_typed.rs"
[[example]]
name = "keyboard_mouse"
path = "examples/keyboard_mouse.rs"
[[example]]
name = "launch_options"
path = "examples/launch_options.rs"
[[example]]
name = "locators"
path = "examples/locators.rs"
[[example]]
name = "manual_pause"
path = "examples/manual_pause.rs"
[[example]]
name = "network_events"
path = "examples/network_events.rs"
[[example]]
name = "persistent_context"
path = "examples/persistent_context.rs"
[[example]]
name = "responsive_testing"
path = "examples/responsive_testing.rs"
[[example]]
name = "routing"
path = "examples/routing.rs"
[[example]]
name = "screenshots"
path = "examples/screenshots.rs"
[[example]]
name = "state_assertions"
path = "examples/state_assertions.rs"
[[example]]
name = "visual_regression"
path = "examples/visual_regression.rs"
[[example]]
name = "websocket"
path = "examples/websocket.rs"
[[test]]
name = "browser_context_proxy_test"
path = "tests/browser_context_proxy_test.rs"
[[test]]
name = "browser_context_serialization_test"
path = "tests/browser_context_serialization_test.rs"
[[test]]
name = "browser_install_error_test"
path = "tests/browser_install_error_test.rs"
[[test]]
name = "file_payload_test"
path = "tests/file_payload_test.rs"
[[test]]
name = "integration"
path = "tests/integration/main.rs"
[[test]]
name = "playwright_version_test"
path = "tests/playwright_version_test.rs"
[[bench]]
name = "browser_operations"
path = "benches/browser_operations.rs"
harness = false
[[bench]]
name = "guid_operations"
path = "benches/guid_operations.rs"
harness = false
[[bench]]
name = "page_operations"
path = "benches/page_operations.rs"
harness = false
[dependencies.base64]
version = "0.22"
[dependencies.futures-util]
version = "0.3"
[dependencies.glob]
version = "0.3"
[dependencies.image]
version = "0.25"
features = ["png"]
default-features = false
[dependencies.mime_guess]
version = "2.0"
[dependencies.parking_lot]
version = "0.12"
[dependencies.regex]
version = "1.10"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1.43"
features = ["full"]
[dependencies.tokio-tungstenite]
version = "0.29"
[dependencies.tracing]
version = "0.1"
[dependencies.url]
version = "2.5"
[dev-dependencies.anyhow]
version = "1.0"
[dev-dependencies.axum]
version = "0.8.8"
features = ["ws"]
[dev-dependencies.criterion]
version = "0.8"
features = [
"html_reports",
"async_tokio",
]
[dev-dependencies.tempfile]
version = "3.8"
[dev-dependencies.tower]
version = "0.5.2"
[dev-dependencies.tower-http]
version = "0.6.6"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"fmt",
"env-filter",
]
[dev-dependencies.urlencoding]
version = "2.1"
[build-dependencies.dirs]
version = "6.0"
[build-dependencies.reqwest]
version = "0.13"
features = ["blocking"]
[build-dependencies.zip]
version = "8.1"
[target."cfg(windows)".dev-dependencies.winapi]
version = "0.3"
features = [
"processthreadsapi",
"psapi",
"minwindef",
]