Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Update bug.md

Pavel Feldman0961c48313d5
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
index 6b212dcc69..370d836a4e 100644
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -7,43 +7,66 @@ assignees: ''
---
-**Context:**
-- Playwright Version: [what Playwright version do you use?]
-- Operating System: [e.g. Windows, Linux or Mac]
-- Node.js version: [e.g. 12.22, 14.6]
-- Browser: [e.g. All, Chromium, Firefox, WebKit]
-- Extra: [any specific details about your environment]
-
-<!-- CLI to auto-capture this info -->
-<!-- npx envinfo --preset playwright --markdown -->
-
-**Code Snippet**
-
-Help us help you! Put down a short code snippet that illustrates your bug and
-that we can run and debug locally. For example:
-
-```javascript
-const {chromium, webkit, firefox} = require('playwright');
-
-(async () => {
- const browser = await chromium.launch();
- const context = await browser.newContext();
- const page = await context.newPage();
-
- // Please include a snippet of HTML that shows an example of the content
- // you are testing.
- await page.setContent(`
- <div>
- …
- </div>
- `);
- // Alternatively, if you are testing a public application, include the URL:
- // await page.goto('https://example.com/')
-
- await page.locator(…);
-})();
+<!-- ⚠️⚠️ Do not delete this template ⚠️⚠️ -->
+
+<!-- 🔎 Search existing issues to avoid creating duplicates. -->
+<!-- 🧪 Test using the latest Playwright release to see if your issue has already been fixed -->
+<!-- 💡 Provide enough information for us to be able to reproduce your issue locally -->
+
+### System info
+- Playwright Version: [v1.XX]
+- Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]
+- Browser: [All, Chromium, Firefox, WebKit]
+- Other info:
+
+### Source code
+
+- [ ] I provided exact source code that allows reproducing the issue locally.
+
+<!-- For simple cases, please provide a self-contained test file along with the config file -->
+<!-- For larger cases, you can provide a GitHub repo you created for this issue -->
+<!-- If we can not reproduce the problem locally, we won't be able to act on it -->
+<!-- You can still file without the exact code and we will try to help, but if we can't repro, it will be closed -->
+
+**Link to the GitHub repository with the repro**
+
+[https://github.com/your_profile/playwright_issue_title]
+
+or
+
+**Config file**
+
+```js
+// playwright.config.ts
+import { defineConfig, devices } from '@playwright/test';
+
+export default defineConfig({
+ projects: [
+ {
+ name: 'chromium',
+ use: { ...devices['Desktop Chrome'], },
+ },
+});
+```
+
+**Test file (self-contained)**
+
+```js
+it('should check the box using setChecked', async ({ page }) => {
+ await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
+ await page.getByRole('checkbox').check();
+ await expect(page.getByRole('checkbox')).toBeChecked();
+});
```
-**Describe the bug**
+**Steps**
+- [Run the test]
+- [...]
+
+**Expected**
+
+[Describe expected behavior]
+
+**Actual**
-Add any other details about the problem here.
+[Describe actual behavior]