tamash-playwright 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +25 -0
  2. package/README.md +38 -8
  3. package/package.json +4 -4
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ Copyright (c) 2026 QtpSudhakar / VibeTestQ
2
+
3
+ All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to use
7
+ the Software for any purpose, including commercial use, subject to the
8
+ following conditions:
9
+
10
+ 1. The Software may not be copied, modified, merged, published, distributed,
11
+ sublicensed, or sold, in whole or in part, without prior written
12
+ permission from the copyright holder.
13
+
14
+ 2. The above copyright notice and this permission notice shall be included
15
+ in all copies of the Software that are permitted under these terms.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+ DEALINGS IN THE SOFTWARE.
24
+
25
+ For questions or concerns, contact us at support@vibetestq.com.
package/README.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # tamash-playwright
2
2
 
3
- **Self-healing tests for Playwright.**
3
+ `tamash-playwright` is a plug and play self-healing solution for any Playwright test framework. All you need to do is install the package, update your AI API key details, and import `test` from `tamash-playwright`.
4
4
 
5
- When you write an automated test, you tell it exactly where to find things on a webpage — a button, a text box, a link. But websites change all the time. A developer renames a field, moves a button, or tweaks the page layout, and suddenly your test can't find what it's looking for anymore. It fails — even though the feature itself works perfectly fine for real users.
5
+ That's it. No code changes required if you're following standard Playwright best practices.
6
6
 
7
- `tamash-playwright` fixes that. It's a drop-in replacement for `@playwright/test` — you barely change your test code at all. Whenever a test action fails because it can't find something, `tamash-playwright` sends a snapshot of the current page to an AI model, which figures out where the element probably moved to, and tries the action again before giving up. If it finds a good match, your test keeps running like nothing happened. If it can't find anything sensible, your test fails normally — it never pretends something worked when it didn't.
7
+ ### Why you need this
8
+
9
+ Websites change often. A button gets renamed or moved, and your test can't find it anymore — even though the app still works fine for real users. Normally, that just means a broken test.
10
+
11
+ `tamash-playwright` fixes this automatically. When a test can't find an element, it asks an AI model to find it on the current page and tries again. If it succeeds, your test keeps going. If not, it fails normally, just like before.
12
+
13
+ Here are the detailed steps to use this package.
8
14
 
9
15
  ## Step 1: Install it
10
16
 
@@ -87,22 +93,46 @@ import { test, expect } from 'tamash-playwright';
87
93
 
88
94
  test('logs in', async ({ page }) => {
89
95
  await page.goto('/');
90
- await page.getByPlaceholder('Username').fill('Admin'); // fixed automatically if this breaks
91
- await page.getByRole('button', { name: 'Login' }).click();
96
+ const txtUserName = page.locator('input[name="username"]').describe('User Name Textbox');
97
+ await txtUserName.fill('testadmin');
98
+
99
+ const txtPassword = page.locator('input[placeholder="Password"]').describe('Password Textbox');
100
+ await txtPassword.fill('secret');
101
+
102
+ const btnLogin = page.locator('button[type="submit"]').describe('Login Button');
103
+ await btnLogin.click();
104
+
92
105
  await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
93
106
  });
94
107
  ```
95
108
 
96
109
  ### A quick tip for better results
97
110
 
98
- If you're using plain CSS selectors (like `page.locator('input[name="username"]')`) rather than Playwright's more descriptive locators (`getByRole`, `getByPlaceholder`, etc.), it helps to add a short, human-readable label so the healer knows what it's actually looking for:
111
+ If you're using plain CSS selectors (like `page.locator('input[name="username"]')`) rather than Playwright's more descriptive locators (`getByRole`, `getByPlaceholder`, etc.), it helps to add a short, human-readable label so the healer knows what it's actually looking for. Chain `.describe('...')` right onto the locator:
99
112
 
100
113
  ```ts
101
- page.locator('input[name="username"]').describe('Username Textbox')
114
+ test('login test using CSS Selectors', async ({ page }) => {
115
+ await page.goto('https://example.com/auth/login');
116
+
117
+ const txtUserName = page.locator('input[name="username"]').describe('User Name Textbox');
118
+ await txtUserName.fill('testadmin');
119
+
120
+ const txtPassword = page.locator('input[placeholder="Password"]').describe('Password Textbox');
121
+ await txtPassword.fill('secret');
122
+
123
+ const btnLogin = page.locator('button[type="submit"]').describe('Login Button');
124
+ await btnLogin.click();
125
+
126
+ await expect(page.locator('h6')).toHaveText('Dashboard');
127
+ });
102
128
  ```
103
129
 
104
130
  This step is optional, but recommended — without it, the healer has to guess purely from a broken CSS selector, which gives it a lot less to work with.
105
131
 
106
132
  ## License
107
133
 
108
- ISC
134
+ Free to use, including commercially. The source code may not be copied, modified, redistributed, or resold without prior written permission. See [LICENSE](LICENSE) for the full terms.
135
+
136
+ ## Support
137
+
138
+ For questions or concerns, contact us at support@vibetestq.com.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tamash-playwright",
3
- "version": "0.1.0",
4
- "description": "Self-healing bindings for Playwright: wraps page/locator/frame actions and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, or Gemini).",
3
+ "version": "0.3.0",
4
+ "description": "Plug and Play Self-healing for Playwright and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, or Gemini).",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -23,8 +23,8 @@
23
23
  "anthropic",
24
24
  "gemini"
25
25
  ],
26
- "author": "",
27
- "license": "ISC",
26
+ "author": "QtpSudhakar / VibeTestQ",
27
+ "license": "SEE LICENSE IN LICENSE",
28
28
  "peerDependencies": {
29
29
  "@playwright/test": ">=1.40.0"
30
30
  },