{"author_name":"motomichi_works","blog_title":"Motomichi Works Blog","blog_url":"https://motomichi-works.hatenablog.com/","url":"https://motomichi-works.hatenablog.com/entry/2025/04/09/124340","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/motomichi_works/","categories":["\u5236\u4f5c","playwright"],"type":"rich","image_url":null,"title":"Playwright\u306e\u30c6\u30b9\u30c8\u3067\u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u8868\u793a\u3059\u308b","version":"1.0","published":"2025-04-09 12:43:40","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmotomichi-works.hatenablog.com%2Fentry%2F2025%2F04%2F09%2F124340\" title=\"Playwright\u306e\u30c6\u30b9\u30c8\u3067\u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u8868\u793a\u3059\u308b - Motomichi Works Blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","provider_name":"Hatena Blog","description":"\u306f\u3058\u3081\u306b CI\u306a\u3069\u3067headless\u3067\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9 \u4ee5\u4e0b\u306e\u3088\u3046\u306b 'console' \u30a4\u30d9\u30f3\u30c8\u3092\u30ea\u30b9\u30cb\u30f3\u30b0\u3057\u307e\u3059\u3002 import { test, expect } from '@playwright/test'; test('\u30b3\u30f3\u30bd\u30fc\u30eb\u30ed\u30b0\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b', async ({ page }) => { // console \u30a4\u30d9\u30f3\u30c8\u306e\u30ea\u30b9\u30cb\u30f3\u30b0\u3092\u958b\u59cb page.on('console', (msg) => { // \u30b3\u30f3\u30bd\u30fc\u30eb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u8868\u793a console.log(`msg.type(\u2026"}