Playwrightで任意のスクリプトを実行する
Playwrightでページ内で任意のスクリプトを実行する方法について紹介する。
page.evaluate
メソッドを使用して、ページ内で任意のスクリプトを実行することができる。
https://playwright.dev/docs/evaluating
const href = await page.evaluate(() => document.location.href);
Playwrightでページ内で任意のスクリプトを実行する方法について紹介する。
page.evaluate
メソッドを使用して、ページ内で任意のスクリプトを実行することができる。
https://playwright.dev/docs/evaluating
const href = await page.evaluate(() => document.location.href);