Skip to main content
bash TV

Self Healing Playwright TS with the help of AI using TAMASH

PrinceAutomationDestination

138 views22 Aug 2026

YouTube

πŸ€– Self-Healing Playwright Test Cases with AI Test case failures due to locator changes are one of the biggest pain points in a tester's life. 😩 But what if your Playwright test cases could automatically identify changed locators and heal themselves using AI? In this video, we'll see how to implement Self-Healing Playwright Test Cases using the tamash-playwright package. πŸš€ What You'll Learn 1. Install and configure TAMASH Playwright 2. Connect TAMASH with Ollama, OpenAI, Claude, or Gemini 3. Automatically heal broken locators during test execution 4. Re-run healed test cases 5. Review and apply the generated locator changes πŸ› οΈ Setup Steps 1️⃣ Install TAMASH Playwright npm install tamash-playwright 2️⃣ Generate an API Key You can use any of the supported AI platforms: Ollama OpenAI Claude Gemini 3️⃣ Configure the .env file Add your AI provider/API configuration to the .env file. 4️⃣ Configure Action Timeout Configure the required action timeout in: playwright.config.ts 5️⃣ Describe Your Locators Add meaningful descriptions to your locators so TAMASH can understand their purpose. Example: page.locator("//input[text()='username']").describe("username textbox"); 6️⃣ Import test from TAMASH Instead of importing test directly from Playwright, use the TAMASH test object in your test cases. 7️⃣ Verify the Setup Run: npx tamash-playwright doctor 8️⃣ Run Your Test Cases Execute your Playwright test cases normally. If a locator has changed, TAMASH can automatically attempt to heal the test case on the fly. πŸ”₯ 9️⃣ Apply the Generated Heals Preview the changes first: npx tamash-playwright apply-heals --dry-run If everything looks good, apply the changes: npx tamash-playwright apply-heals 🎯 The Goal Instead of manually fixing every broken locator after UI changes, AI can help identify and repair locator failures automatically, reducing maintenance effort and making your Playwright automation more resilient. If you find this useful, Like πŸ‘ | Share πŸ”„ | Subscribe πŸ”” #Playwright #TestAutomation #AI #SelfHealing #TAMASH #PlaywrightAutomation #AutomationTesting #SoftwareTesting #SDET #AITesting

Join the discussion

Sign in to join the discussion

Sign in