使い方
🚀 起動
powershell
powershell -ExecutionPolicy Bypass -File .\scripts\launch_logged_in_chrome.ps1🧹 専用ブラウザを閉じる
powershell
powershell -ExecutionPolicy Bypass -File .\scripts\close_logged_in_chrome.ps1⚙️ プロファイルやポートを変える
powershell
powershell -ExecutionPolicy Bypass -File .\scripts\launch_logged_in_chrome.ps1 `
-UserDataDir "D:\Prj\my-google-agent-profile" `
-Port 9333 `
-Url "https://mail.google.com/"🔄 基本フロー
- 専用 Chrome を起動
- Google に手動ログイン
- CDP ポートを確認
- Playwright を接続
- Gmail や Google アプリへ移動
- 同じ接続を継続利用
✉️ Gmail に移動する例
javascript
await attachedPage.goto("https://mail.google.com/mail/u/0/#inbox", {
waitUntil: "domcontentloaded",
});