{"id":"cef92351-2a53-44b2-acdc-26f5e38d3dcf","shortId":"s2B8qr","kind":"skill","title":"playwright-cli","tagline":"Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.","description":"# Browser Automation with playwright-cli\n\n## Quick start\n\nTo open a browser in headed mode (visible window), YOU MUST FOLLOW THESE 2 STEPS:\n1. Configure headed mode: `playwright-cli config --headed`\n2. Open a blank URL: `playwright-cli open about:blank`\n\nBasic usage:\n```bash\nplaywright-cli open https://playwright.dev\nplaywright-cli click e15\nplaywright-cli type \"page.click\"\nplaywright-cli press Enter\n```\n\n## Opening Local HTML Files\n\n`playwright-cli open` does **NOT** support `file://` protocol. Local HTML files must be served via HTTP first.\n\n**Windows — one-liner（推荐）：**\n```bash\npowershell -Command \"Start-Process python -ArgumentList '-m http.server <PORT> --directory <DIR>' -WindowStyle Hidden\" && timeout /t 2 /nobreak >nul && playwright-cli open http://localhost:<PORT>/index.html\n```\n\n**示例** — 打开 `MISC/eight_qs/index.html`：\n```bash\npowershell -Command \"Start-Process python -ArgumentList '-m http.server 8765 --directory MISC/eight_qs' -WindowStyle Hidden\" && timeout /t 2 /nobreak >nul && playwright-cli open http://localhost:8765/index.html\n```\n\n**端口选择**：避免常用端口冲突，推荐 8700-8799 随机选一个。\n\n**用完停止服务器：**\n```bash\npowershell -Command \"Get-NetTCPConnection -LocalPort 8765 -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }\"\n```\n\n## Core workflow\n\n1. Navigate: `playwright-cli open https://example.com`\n2. Interact using refs from the snapshot\n3. Re-snapshot after significant changes\n\n## Commands\n\n### Core\n\n```bash\nplaywright-cli open https://example.com/\nplaywright-cli close\nplaywright-cli type \"search query\"\nplaywright-cli click e3\nplaywright-cli dblclick e7\nplaywright-cli fill e5 \"user@example.com\"\nplaywright-cli drag e2 e8\nplaywright-cli hover e4\nplaywright-cli select e9 \"option-value\"\nplaywright-cli upload ./document.pdf\nplaywright-cli check e12\nplaywright-cli uncheck e12\nplaywright-cli snapshot\nplaywright-cli snapshot --filename=after-click.yaml\nplaywright-cli eval \"document.title\"\nplaywright-cli eval \"el => el.textContent\" e5\nplaywright-cli dialog-accept\nplaywright-cli dialog-accept \"confirmation text\"\nplaywright-cli dialog-dismiss\nplaywright-cli resize 1920 1080\n```\n\n### Navigation\n\n```bash\nplaywright-cli go-back\nplaywright-cli go-forward\nplaywright-cli reload\n```\n\n### Keyboard\n\n```bash\nplaywright-cli press Enter\nplaywright-cli press ArrowDown\nplaywright-cli keydown Shift\nplaywright-cli keyup Shift\n```\n\n### Mouse\n\n```bash\nplaywright-cli mousemove 150 300\nplaywright-cli mousedown\nplaywright-cli mousedown right\nplaywright-cli mouseup\nplaywright-cli mouseup right\nplaywright-cli mousewheel 0 100\n```\n\n### Save as\n\n```bash\nplaywright-cli screenshot\nplaywright-cli screenshot e5\nplaywright-cli screenshot --filename=page.png\nplaywright-cli pdf --filename=page.pdf\n```\n\n### Tabs\n\n```bash\nplaywright-cli tab-list\nplaywright-cli tab-new\nplaywright-cli tab-new https://example.com/page\nplaywright-cli tab-close\nplaywright-cli tab-close 2\nplaywright-cli tab-select 0\n```\n\n### Storage\n\n```bash\nplaywright-cli state-save\nplaywright-cli state-save auth.json\nplaywright-cli state-load auth.json\n\n# Cookies\nplaywright-cli cookie-list\nplaywright-cli cookie-list --domain=example.com\nplaywright-cli cookie-get session_id\nplaywright-cli cookie-set session_id abc123\nplaywright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure\nplaywright-cli cookie-delete session_id\nplaywright-cli cookie-clear\n\n# LocalStorage\nplaywright-cli localstorage-list\nplaywright-cli localstorage-get theme\nplaywright-cli localstorage-set theme dark\nplaywright-cli localstorage-delete theme\nplaywright-cli localstorage-clear\n\n# SessionStorage\nplaywright-cli sessionstorage-list\nplaywright-cli sessionstorage-get step\nplaywright-cli sessionstorage-set step 3\nplaywright-cli sessionstorage-delete step\nplaywright-cli sessionstorage-clear\n```\n\n### Network\n\n```bash\nplaywright-cli route \"**/*.jpg\" --status=404\nplaywright-cli route \"https://api.example.com/**\" --body='{\"mock\": true}'\nplaywright-cli route-list\nplaywright-cli unroute \"**/*.jpg\"\nplaywright-cli unroute\n```\n\n### DevTools\n\n```bash\nplaywright-cli console\nplaywright-cli console warning\nplaywright-cli network\nplaywright-cli run-code \"async page => await page.context().grantPermissions(['geolocation'])\"\nplaywright-cli tracing-start\nplaywright-cli tracing-stop\nplaywright-cli video-start\nplaywright-cli video-stop video.webm\n```\n\n### Install\n\n```bash\nplaywright-cli install-browser\nplaywright-cli install-skills\n```\n\n### Configuration\n```bash\n# Use specific browser when creating session\nplaywright-cli open --browser=chrome\nplaywright-cli open --browser=firefox\nplaywright-cli open --browser=webkit\nplaywright-cli open --browser=msedge\n# Connect to browser via extension\nplaywright-cli open --extension\n\n# Configure the session\nplaywright-cli config --config my-config.json\nplaywright-cli config --headed --in-memory --browser=firefox\n# Configure named session\nplaywright-cli --session=mysession config my-config.json\n# Start with configured session\nplaywright-cli open --config=my-config.json\n```\n\n### Sessions\n\n```bash\nplaywright-cli --session=mysession open example.com\nplaywright-cli --session=mysession click e6\nplaywright-cli session-list\nplaywright-cli session-stop mysession\nplaywright-cli session-restart mysession\nplaywright-cli session-stop-all\nplaywright-cli session-delete\nplaywright-cli session-delete mysession\n```\n\n## Example: Form submission\n\n```bash\nplaywright-cli open https://example.com/form\nplaywright-cli snapshot\n\nplaywright-cli fill e1 \"user@example.com\"\nplaywright-cli fill e2 \"password123\"\nplaywright-cli click e3\nplaywright-cli snapshot\n```\n\n## Example: Multi-tab workflow\n\n```bash\nplaywright-cli open https://example.com\nplaywright-cli tab-new https://example.com/other\nplaywright-cli tab-list\nplaywright-cli tab-select 0\nplaywright-cli snapshot\n```\n\n## Example: Debugging with DevTools\n\n```bash\nplaywright-cli open https://example.com\nplaywright-cli click e4\nplaywright-cli fill e7 \"test\"\nplaywright-cli console\nplaywright-cli network\n```\n\n```bash\nplaywright-cli open https://example.com\nplaywright-cli tracing-start\nplaywright-cli click e4\nplaywright-cli fill e7 \"test\"\nplaywright-cli tracing-stop\n```\n\n## Specific tasks\n\n* **Request mocking** [references/request-mocking.md](references/request-mocking.md)\n* **Running Playwright code** [references/running-code.md](references/running-code.md)\n* **Session management** [references/session-management.md](references/session-management.md)\n* **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)\n* **Test generation** [references/test-generation.md](references/test-generation.md)\n* **Tracing** [references/tracing.md](references/tracing.md)\n* **Video recording** [references/video-recording.md](references/video-recording.md)","tags":["playwright","google","adk","agent","valkryhx","agent-development","agent-skills","agent-swarm","agent-team","agentic-ai","dynamic-skills","google-adk"],"capabilities":["skill","source-valkryhx","skill-playwright","topic-agent-development","topic-agent-skills","topic-agent-swarm","topic-agent-team","topic-agentic-ai","topic-dynamic-skills","topic-google-adk","topic-vibe-coding"],"categories":["google_adk_agent"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/valkryhx/google_adk_agent/playwright","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add valkryhx/google_adk_agent","source_repo":"https://github.com/valkryhx/google_adk_agent","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (6,772 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:45.713Z","embedding":null,"createdAt":"2026-05-18T13:22:14.261Z","updatedAt":"2026-05-18T19:14:45.713Z","lastSeenAt":"2026-05-18T19:14:45.713Z","tsv":"'-8799':190 '/**':656 '/document.pdf':292 '/form':888 '/index.html':156 '/nobreak':149,178 '/other':933 '/page':469 '/t':147,176 '0':421,489,946 '1':64,214 '100':422 '1080':350 '150':397 '1920':349 '2':62,73,148,177,221,482 '3':228,627 '300':398 '404':649 '8700':189 '8765':170,200 '8765/index.html':185 'abc123':543,552 'accept':330,336 'after-click.yaml':312 'api.example.com':655 'api.example.com/**':654 'applic':34 'argumentlist':140,167 'arrowdown':380 'async':696 'auth.json':504,511 'autom':4,42 'await':698 'back':358 'bash':86,133,160,193,237,352,370,392,425,448,491,642,676,728,742,823,881,919,955,980 'basic':84 'blank':76,83 'bodi':657 'browser':5,41,52,734,745,753,759,765,771,775,800 'chang':234 'check':296 'chrome':754 'clear':570,605,640 'cli':3,46,70,80,89,94,99,104,113,153,182,218,240,245,249,255,260,265,271,277,282,290,295,300,305,309,315,320,327,333,341,347,355,361,367,373,378,383,388,395,401,405,410,414,419,428,432,437,443,451,457,463,472,478,485,494,500,507,515,521,529,537,546,559,567,574,580,587,595,602,609,615,622,630,637,645,652,662,668,673,679,683,688,692,704,710,716,722,731,737,751,757,763,769,780,788,794,807,818,826,833,840,846,853,860,867,873,884,891,895,901,907,912,922,927,936,942,949,958,963,968,974,978,983,988,994,999,1005 'click':95,256,836,908,964,995 'close':246,475,481 'code':695,1017 'command':135,162,195,235 'config':71,789,790,795,810,820 'configur':65,741,783,802,814 'confirm':337 'connect':773 'consol':680,684,975 'cooki':512,517,523,531,539,548,561,569,1026 'cookie-clear':568 'cookie-delet':560 'cookie-get':530 'cookie-list':516,522 'cookie-set':538,547 'core':212,236 'creat':747 'dark':592 'data':14 'dblclick':261 'debug':952 'delet':562,598,633,870,876 'devtool':675,954 'dialog':329,335,343 'dialog-accept':328,334 'dialog-dismiss':342 'directori':143,171 'dismiss':344 'document.title':317 'domain':525,553 'drag':272 'e1':897 'e12':297,302 'e15':96 'e2':273,903 'e3':257,909 'e4':279,965,996 'e5':267,324,434 'e6':837 'e7':262,970,1001 'e8':274 'e9':284 'el':322 'el.textcontent':323 'enter':106,375 'erroract':201 'eval':316,321 'exampl':878,914,951 'example.com':220,242,468,526,554,830,887,924,932,960,985 'example.com/form':886 'example.com/other':931 'example.com/page':467 'extens':777,782 'extract':15,36 'file':110,121 'filenam':311,439,445 'fill':11,28,266,896,902,969,1000 'firefox':760,801 'first':127 'follow':60 'forc':211 'foreach':204 'foreach-object':203 'form':10,29,879 'forward':364 'generat':1031 'geoloc':701 'get':197,532,583,618 'get-nettcpconnect':196 'go':357,363 'go-back':356 'go-forward':362 'grantpermiss':700 'head':54,66,72,796 'hidden':145,174 'hover':278 'html':109,120 'http':126 'http.server':142,169 'httpon':555 'id':209,534,542,551,564 'in-memori':797 'inform':37 'instal':727,733,739 'install-brows':732 'install-skil':738 'interact':6,24,222 'jpg':647,670 'keyboard':369 'keydown':384 'keyup':389 'liner':131 'list':454,518,524,577,612,665,843,939 'load':510 'local':108,119 'localhost':155,184 'localport':199 'localstorag':571,576,582,589,597,604,1027 'localstorage-clear':603 'localstorage-delet':596 'localstorage-get':581 'localstorage-list':575 'localstorage-set':588 'm':141,168 'manag':1021 'memori':799 'misc/eight_qs':172 'misc/eight_qs/index.html':159 'mock':658,1012 'mode':55,67 'mous':391 'mousedown':402,406 'mousemov':396 'mouseup':411,415 'mousewheel':420 'msedg':772 'multi':916 'multi-tab':915 'must':59,122 'my-config.json':791,811,821 'mysess':809,828,835,850,857,877 'name':803 'navig':22,215,351 'need':20 'nettcpconnect':198 'network':641,689,979 'new':460,466,930 'nul':150,179 'object':205 'one':130 'one-lin':129 'open':50,74,81,90,107,114,154,183,219,241,752,758,764,770,781,819,829,885,923,959,984 'option':286 'option-valu':285 'owningprocess':210 'page':27,40,697 'page.click':101 'page.context':699 'page.pdf':446 'page.png':440 'password123':904 'pdf':444 'playwright':2,45,69,79,88,93,98,103,112,152,181,217,239,244,248,254,259,264,270,276,281,289,294,299,304,308,314,319,326,332,340,346,354,360,366,372,377,382,387,394,400,404,409,413,418,427,431,436,442,450,456,462,471,477,484,493,499,506,514,520,528,536,545,558,566,573,579,586,594,601,608,614,621,629,636,644,651,661,667,672,678,682,687,691,703,709,715,721,730,736,750,756,762,768,779,787,793,806,817,825,832,839,845,852,859,866,872,883,890,894,900,906,911,921,926,935,941,948,957,962,967,973,977,982,987,993,998,1004,1016 'playwright-c':1,44,68,78,87,92,97,102,111,151,180,216,238,243,247,253,258,263,269,275,280,288,293,298,303,307,313,318,325,331,339,345,353,359,365,371,376,381,386,393,399,403,408,412,417,426,430,435,441,449,455,461,470,476,483,492,498,505,513,519,527,535,544,557,565,572,578,585,593,600,607,613,620,628,635,643,650,660,666,671,677,681,686,690,702,708,714,720,729,735,749,755,761,767,778,786,792,805,816,824,831,838,844,851,858,865,871,882,889,893,899,905,910,920,925,934,940,947,956,961,966,972,976,981,986,992,997,1003 'playwright.dev':91 'powershel':134,161,194 'press':105,374,379 'process':138,165,208 'protocol':118 'python':139,166 'queri':252 'quick':47 're':230 're-snapshot':229 'record':1038 'ref':224 'references/request-mocking.md':1013,1014 'references/running-code.md':1018,1019 'references/session-management.md':1022,1023 'references/storage-state.md':1028,1029 'references/test-generation.md':1032,1033 'references/tracing.md':1035,1036 'references/video-recording.md':1039,1040 'reload':368 'request':1011 'resiz':348 'restart':856 'right':407,416 'rout':646,653,664 'route-list':663 'run':694,1015 'run-cod':693 'save':423,497,503 'screenshot':12,31,429,433,438 'search':251 'secur':556 'select':283,488,945 'serv':124 'session':533,541,550,563,748,785,804,808,815,822,827,834,842,848,855,862,869,875,1020 'session-delet':868,874 'session-list':841 'session-restart':854 'session-stop':847 'session-stop-al':861 'sessionstorag':606,611,617,624,632,639 'sessionstorage-clear':638 'sessionstorage-delet':631 'sessionstorage-get':616 'sessionstorage-list':610 'sessionstorage-set':623 'set':540,549,590,625 'shift':385,390 'signific':233 'silentlycontinu':202 'skill':740 'skill-playwright' 'snapshot':227,231,306,310,892,913,950 'source-valkryhx' 'specif':744,1009 'start':48,137,164,707,719,812,991 'start-process':136,163 'state':496,502,509,1025 'state-load':508 'state-sav':495,501 'status':648 'step':63,619,626,634 'stop':207,713,725,849,863,1008 'stop-process':206 'storag':490,1024 'submiss':880 'support':117 'tab':447,453,459,465,474,480,487,917,929,938,944 'tab-clos':473,479 'tab-list':452,937 'tab-new':458,464,928 'tab-select':486,943 'take':30 'task':1010 'test':9,32,971,1002,1030 'text':338 'theme':584,591,599 'timeout':146,175 'topic-agent-development' 'topic-agent-skills' 'topic-agent-swarm' 'topic-agent-team' 'topic-agentic-ai' 'topic-dynamic-skills' 'topic-google-adk' 'topic-vibe-coding' 'trace':706,712,990,1007,1034 'tracing-start':705,989 'tracing-stop':711,1006 'true':659 'type':100,250 'uncheck':301 'unrout':669,674 'upload':291 'url':77 'usag':85 'use':16,223,743 'user':19 'user@example.com':268,898 'valu':287 'via':125,776 'video':718,724,1037 'video-start':717 'video-stop':723 'video.webm':726 'visibl':56 'warn':685 'web':8,26,33,39 'webkit':766 'websit':23 'window':57,128 'windowstyl':144,173 'workflow':213,918 '打开':158 '推荐':132,188 '用完停止服务器':192 '示例':157 '端口选择':186 '避免常用端口冲突':187 '随机选一个':191","prices":[{"id":"d7ac97ec-3f4b-49a2-ab14-bc5f08a3ffd5","listingId":"cef92351-2a53-44b2-acdc-26f5e38d3dcf","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"valkryhx","category":"google_adk_agent","install_from":"skills.sh"},"createdAt":"2026-05-18T13:22:14.261Z"}],"sources":[{"listingId":"cef92351-2a53-44b2-acdc-26f5e38d3dcf","source":"github","sourceId":"valkryhx/google_adk_agent/playwright","sourceUrl":"https://github.com/valkryhx/google_adk_agent/tree/main/skills/playwright","isPrimary":false,"firstSeenAt":"2026-05-18T13:22:14.261Z","lastSeenAt":"2026-05-18T19:14:45.713Z"}],"details":{"listingId":"cef92351-2a53-44b2-acdc-26f5e38d3dcf","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"valkryhx","slug":"playwright","github":{"repo":"valkryhx/google_adk_agent","stars":6,"topics":["agent-development","agent-skills","agent-swarm","agent-team","agentic-ai","dynamic-skills","google-adk","vibe-coding"],"license":null,"html_url":"https://github.com/valkryhx/google_adk_agent","pushed_at":"2026-04-23T07:34:09Z","description":"a startup but not simple agent demo using  google adk.","skill_md_sha":"1638066c774620c830b8ab067c9212ce29328bc2","skill_md_path":"skills/playwright/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/valkryhx/google_adk_agent/tree/main/skills/playwright"},"layout":"multi","source":"github","category":"google_adk_agent","frontmatter":{"name":"playwright-cli","description":"Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages."},"skills_sh_url":"https://skills.sh/valkryhx/google_adk_agent/playwright"},"updatedAt":"2026-05-18T19:14:45.713Z"}}