A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://playwright.dev/python/docs/api/class-cdpsession below:

Website Navigation


CDPSession | Playwright Python

CDPSession

The CDPSession instances are used to talk raw Chrome Devtools Protocol:

Useful links:

client = page.context.new_cdp_session(page)
client.send("Animation.enable")
client.on("Animation.animationCreated", lambda: print("animation created!"))
response = client.send("Animation.getPlaybackRate")
print("playback rate is " + str(response["playbackRate"]))
client.send("Animation.setPlaybackRate", {
"playbackRate": response["playbackRate"] / 2
})
client = await page.context.new_cdp_session(page)
await client.send("Animation.enable")
client.on("Animation.animationCreated", lambda: print("animation created!"))
response = await client.send("Animation.getPlaybackRate")
print("playback rate is " + str(response["playbackRate"]))
await client.send("Animation.setPlaybackRate", {
"playbackRate": response["playbackRate"] / 2
})
Methods detachAdded before v1.9 cdpSession.detach

Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be used to send messages.

Usage

Returns

sendAdded before v1.9 cdpSession.send

Usage

cdp_session.send(method)
cdp_session.send(method, **kwargs)

Arguments

Returns


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4