31 文字
1 分

Playwrightで任意のスクリプトを実行する

2022-10-04

page.evaluateメソッドを使用して、ページ内で任意のスクリプトを実行することができる。

https://playwright.dev/docs/evaluating

const href = await page.evaluate(() => document.location.href);
Playwrightで任意のスクリプトを実行する
https://blog.ohirunewani.com/posts/playwright-run-arbitrary-script/
作者
hrdtbs
公開日
2022-10-04
ライセンス
CC BY-NC-SA 4.0