A RetroSearch Logo

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

Search Query:

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

CDPSession | Playwright

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.animation_created", lambda: print("animation created!"))

response = client.send("animation.get_playback_rate")

print("playback rate is " + response["playback_rate"])

client.send("animation.set_playback_rate", {

playback_rate: response["playback_rate"] / 2

})

client = await page.context().new_cdp_session(page)

await client.send("animation.enable")

client.on("animation.animation_created", lambda: print("animation created!"))

response = await client.send("animation.get_playback_rate")

print("playback rate is " + response["playback_rate"])

await client.send("animation.set_playback_rate", {

playback_rate: response["playback_rate"] / 2

})

cdp_session.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.

cdp_session.send(method, **kwargs)#

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