playwright-interactive
यह क्या करती है
यह स्किल एजेंट को एक चल रहे ऐप को ऐसे ब्राउज़र सेशन में खोलने और नियंत्रित करने देती है जो चरणों के बीच खुला रहता है। यह उन डेवलपर्स के लिए है जो अपने यूज़र इंटरफ़ेस पर काम करते हुए उसे डीबग और टेस्ट करना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप लोकल वेब ऐप या Electron ऐप को एक-एक कदम करके डीबग करना चाहते हैं।
- ✓जब हर बदलाव के बाद जाँचना हो कि यूज़र इंटरफ़ेस कैसा दिखता है।
- ✓जब आप हर बार ब्राउज़र दोबारा खोले बिना कार्यात्मक और दृश्य जाँच चाहते हैं।
Skill का लिंक
https://github.com/openai/skills/blob/main/skills/.curated/playwright-interactive/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरा लोकल ऐप ब्राउज़र में खोलिए, साइनअप फ़ॉर्म में क्लिक करके देखिए, और बताइए कि कहाँ गड़बड़ होती है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक स्थायी कोड वातावरण में Playwright सेट करता है, चरणों के बीच ब्राउज़र हैंडल ज़िंदा रखता है, और जो दिखता है उसकी रिपोर्ट देता है, स्क्रीनशॉट समेत।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Playwright Interactive Skill
Use a persistent js_repl Playwright session to debug local web or Electron apps, keep the same handles alive across iterations, and run functional plus visual QA without restarting the whole toolchain unless the process ownership changed.
Preconditions
js_replmust be enabled for this skill.- If
js_replis missing, enable it in~/.codex/config.toml:
[features]
js_repl = true
- You can also start a new session with
--enable js_repl(equivalent to-c features.js_repl=true). - After enabling
js_repl, start a new Codex session so the tool list refreshes. - For now, run this workflow with sandboxing disabled: start Codex with
--sandbox danger-full-access(or the equivalent config forsandbox_mode=danger-full-access). This is a temporary requirement whilejs_repl+ Playwright support inside the sandbox is still being completed. - Run setup from the same project directory you need to debug.
- Treat
js_repl_resetas a recovery tool, not routine cleanup. Resetting the kernel destroys your Playwright handles.
One-time setup
test -f package.json || npm init -y
npm install playwright
# Web-only, for headed Chromium or mobile emulation:
# npx playwright install chromium
# Electron-only, and only if the target workspace is the app itself:
# npm install --save-dev electron
node -e "import('playwright').then(() => console.log('playwright import ok')).catch((error) => { console.error(error); process.exit(1); })"
If you switch to a different workspace later, repeat setup there.
Core Workflow
- Write a brief QA inventory before testing:
- Build the inventory from three sources: the user's requested requirements, the user-visible features or behaviors you actually implemented, and the claims you expect to make in the final response.
- Anything that appears in any of those three sources must map to at least one QA check before signoff.
- List the user-visible claims you intend to sign off on.
- List every meaningful user-facing control, mode switch, or implemented interactive behavior.
- List the state changes or view changes each control or implemented behavior can cause.
- Use this as the shared coverage list for both functional QA and visual QA.
- For each claim or control-state pair, note the intended functional check, the specific state where the visual check must happen, and the evidence you expect to capture.
- If a requirement is visually central but subjective, convert it into an observable QA check instead of leaving it implicit.
- Add at least 2 exploratory or off-happy-path scenarios that could expose fragile behavior.
- Run the bootstrap cell once.
- Start or confirm any required dev server in a persistent TTY session.
- Launch the correct runtime and keep reusing the same Playwright handles.
- After each code change, reload for renderer-only changes or relaunch for main-process/startup changes.
- Run functional QA with normal user input.
- Run a separate visual QA pass.
- Verify viewport fit and capture the screenshots needed to support your claims.
- Clean up the Playwright session only when the task is actually finished.
Bootstrap (Run Once)
var chromium;
var electronLauncher;
var browser;
var context;
var page;
var mobileContext;
var mobilePage;
var electronApp;
var appWindow;
try {
({ chromium, _electron: electronLauncher } = await import("playwright"));
console.log("Playwright loaded");
} catch (error) {
throw new Error(
`Could not load playwright from the current js_repl cwd. Run the setup commands from this workspace first. Original error: ${error}`
);
}
Binding rules:
- Use
varfor the shared top-level Playwright handles because laterjs_replcells reuse them. - The setup cells below are intentionally short happy paths. If a handle looks stale, set that binding to
undefinedand rerun the cell instead of adding recovery logic everywhere. - Prefer one named handle per surface you care about (
page,mobilePage,appWindow) over repeatedly rediscovering pages from the context.
Shared web helpers:
var resetWebHandles = function () {
context = undefined;
page = undefined;
mobileContext = undefined;
mobilePage = undefined;
};
var ensureWebBrowser = async function () {
if (browser && !browser.isConnected()) {
browser = undefined;
resetWebHandles();
}
browser ??= await chromium.launch({ headless: false });
अक्सर पूछे जाने वाले सवाल
क्या इसके लिए कोई खास सेटअप चाहिए?
हाँ। js_repl फ़ीचर चालू होना चाहिए और प्रोजेक्ट में Playwright इंस्टॉल होना चाहिए।
इसे सैंडबॉक्स के बिना क्यों चलाना पड़ता है?
स्किल कहती है कि यह अस्थायी ज़रूरत है, क्योंकि सैंडबॉक्स के अंदर Playwright का सपोर्ट अभी पूरा हो रहा है।
क्या यह Electron ऐप्स को भी कवर करती है?
हाँ। स्किल वेब ऐप और Electron ऐप दोनों को कवर करती है।
जानकारी
लेखक का मूल विवरण
Persistent browser and Electron interaction through `js_repl` for fast iterative UI debugging.
repo: openai/skills
लोकप्रियता
- GitHub स्टार
- 28k
- रैंकिंग में स्थान
- #9860
- लाइसेंस
- —
- अपडेट की गई
- 28/10/2026
कमेंट
- …
इस repository की और skills
aspnet-core
28kयह आपके एजेंट को ASP.NET Core वेब ऐप बनाने, जांचने या अपग्रेड करने में मदद करती है, सही ऐप प्रकार चुनकर और .NET के लिए Microsoft के मौजूदा दिशानिर्देश मानकर।
chatgpt-apps
28kयह आपके एजेंट को ChatGPT ऐप बनाने में मदद करती है, जो MCP सर्वर को widget UI के साथ जोड़ता है, टूल डिज़ाइन, UI resources, metadata और लोकल सेटअप सहित।
cli-creator
28kयह आपके एजेंट को API दस्तावेज़ या स्क्रिप्ट से ऐसा कमांड-लाइन टूल बनाने में मदद करती है, जो किसी भी फ़ोल्डर से चले और स्थिर JSON लौटाए।
define-goal
28kयह आपके एजेंट को धुंधले इरादे को सफलता के मानदंड और दायरे वाले साफ़ लक्ष्य में बदलने में मदद करती है, काम शुरू होने से पहले।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।