PlayWright? Microsoft?? ??? ? UI ??? ??? ????????.
??? ????? ???? ??? ???, ??? ??, ??? ???? ??? ??? ?????? ???? ?? ??? ???.
?? ???? ??:
- ?? ??, ??? ??? ?? ??? ??? ? ?? ??? ?? ????? ????? ???? ? ?? ??????.
- ???? ???? ????? ?? ????? ????? ???? ???? ? ??? ???? ??? ??? Shadow DOM ??? ?????.
- PlayWright? ? ???? ?? ???? ????? ?????. ???? ????? ??? ??? ???? ???? ????? ??? ?? ?? ?? ?? ??? ??? ?????. ??? ???? ????? ???? ?? ? ????? ??? ????.
- ?? ??, ??? ???, ???? ?? ?? ??? ?????.
PlayWright ? ??? ? Cypress
?? ?? ??? ??? ? UI ??? ??? ?????? ?????? ?? ?? ???? 10? ? Selenium, ?? ?? ?? Cypress, ??? ??? ???? PlayWright? ?????. ??? ??? ??? ?? ??? ????? ??? ?????
Feature | PlayWright | Selenium | Cypress |
---|---|---|---|
Supported Languages | JavaScript, Java, C#, Python | JavaScript, Java, C#, Python, Ruby | JavaScript/TypeScript |
Supported Browsers | Chrome, Edge, Firefox, Safari | Chrome, Edge, Firefox, Safari, IE | Chrome, Edge, Firefox, Safari |
Testing Framework | Frameworks for supported languages | Frameworks for supported languages | Frameworks for supported languages |
Usability | Easy to use and configure | Complex setup with a learning curve | Easy to use and configure |
Code Complexity | Simple | Moderate | Simple |
DOM Manipulation | Simple | Moderate | Simple |
Community Maturity | Improving gradually | Highly mature | Fairly mature |
Headless Mode Support | Yes | Yes | Yes |
Concurrency Support | Supported | Supported | Depends on CI/CD tools |
iframe Support | Supported | Supported | Supported via plugins |
Driver | Not required | Requires a browser-specific driver | Not required |
Multi-Tab Operations | Supported | Not supported | Supported |
Drag and Drop | Supported | Supported | Supported |
Built-in Reporting | Yes | No | Yes |
Cross-Origin Support | Supported | Supported | Supported |
Built-in Debugging | Yes | No | Yes |
Automatic Wait | Yes | No | Yes |
Built-in Screenshot/Video | Yes | No video recording | Yes |
?? ??:
- ?? ??: PlayWright ? Selenium? Java, C# ? Python? ????? JavaScript/TypeScript? ???? ?? ??? ????? ???? ?? ??? ????.
- ??? ??: PlayWright? Selenium? ?? Google? ?? ??? ????? ???? Chromium ?? ????? ?????. Firefox? ?? ????? ?? ??? ????? ??? JavaScript ??? ?????. Selenium? ?? ????? ????? PlayWright? ?? ?? ?????. ?? Cypress? JavaScript? ???? ????? ?????.
- ???? ??: Selenium? Internet Explorer? ????? IE? ????? ???? ???? ?? ?????.
- ?? ???: ? ?? ????? ?? ?? ??? ????. ??? PlayWright? Cypress? Selenium? ?? ??? ?????? ? ??? ??????.
????
PlayWright? ?? ??? ????? Node.js? ?? ?????. Python ?? Java ??? ????? ??? ???? PlayWright? ??? ?? Node.js ????? ?????? ?? Node.js ??? ?????. ??? ? ?????? JavaScript/TypeScript? ??? ?????.
?? ? ??
- Node.js? ???? ??? ?????.
- npm ?? Yarn? ???? PlayWright ????? ??????.
# Using npm npm init playwright@latest # Using yarn yarn create playwright
- ??? ????.
- TypeScript ?? JavaScript? ?????(???: TypeScript).
- ??? ???? ??? ?????.
- PlayWright ?? ???? ?? ??? ?????(???: True).
???? ????? ???? PlayWright?? Chromium, Firefox ? WebKit? ??????? ??? ?? ?? ? ????. ? ????? PlayWright ??? ?????? ?? ? ? ?? ?? ??? ?????.
???? ??
??? ? ???? ???? ?? ???:
playwright.config.ts # PlayWright configuration file package.json # Node.js configuration file package-lock.json # Node.js dependency lock file tests/ # Your test directory example.spec.ts # Template test case tests-examples/ # Example tests directory demo-todo-app.spec.ts # Example test case
?? ??? ?? ??:
npx playwright test
???? ???? ???? ???? ???? ??? ??? ?? ?????.
Running 6 tests using 6 workers 6 passed (10s) To open the last HTML report run: npx playwright show-report
?? ?? ??
example.spec.ts ??? ??? ??? ????.
import { test, expect } from '@playwright/test'; test('has title', async ({ page }) => { await page.goto('https://playwright.dev/'); await expect(page).toHaveTitle(/Playwright/); }); test('get started link', async ({ page }) => { await page.goto('https://playwright.dev/'); await page.getByRole('link', { name: 'Get started' }).click(); await expect(page).toHaveURL(/.*intro/); });
- ? ?? ???: ??? ??? "???"? ???? ??? ?????.
- ? ?? ???: "????" ??? ???? URL? ?????.
? ??? ???? ??? ?????.
- ??? ??(?: '?? ??').
- ??? ??? ???? ??
?? ??? ??? ????.
- page.goto: URL? ?????.
- Expect(page).toHaveTitle: ??? ??? ?????.
- page.getByRole: ???? ??? ????.
- ??: ??? ??? ??? ??? ?????.
????? ??? ??
??? ???? ?????:
- ?? ??? ??:
# Using npm npm init playwright@latest # Using yarn yarn create playwright
- ?? ??? ?? ??:
playwright.config.ts # PlayWright configuration file package.json # Node.js configuration file package-lock.json # Node.js dependency lock file tests/ # Your test directory example.spec.ts # Template test case tests-examples/ # Example tests directory demo-todo-app.spec.ts # Example test case
- ??? ?? ???:
npx playwright test
?? ??
Codegen ??? ???? ????? ?????.
Running 6 tests using 6 workers 6 passed (10s) To open the last HTML report run: npx playwright show-report
??? ??? ??? ??? ? ????. ??: ???? ???? ?? ??? ??? ???? ?? ?? ????.
?? ??? ???
?? ? ??
? ????? ??? ??? ?????? ?? ? ?? ???? ??? ??? ?????. ?? ??? ???? ??? ???? ??? ?? ??? ???? ??? ?? ????. ??? ???? ???? ???? ?? ???? ???? ???? ???? ??? ???? ??? ???? ????. ?? ?? ??? ?? ?? ??? ?????. ?? ????? ??? ?? ???? ?? ??? ???? ??? ??? ????? Selenium? findElement ???? ????.
??? ??
?? ,
import { test, expect } from '@playwright/test'; test('has title', async ({ page }) => { await page.goto('https://playwright.dev/'); await expect(page).toHaveTitle(/Playwright/); }); test('get started link', async ({ page }) => { await page.goto('https://playwright.dev/'); await page.getByRole('link', { name: 'Get started' }).click(); await expect(page).toHaveURL(/.*intro/); });
????? ???
locator.setChecked() ?? locator.check()? ???? input[type=checkbox], input[type=radio] ?? [role=checkbox] ??? ?? ??? ?? ?????.
npx playwright test
??? ??
locator.selectOption()? ????
npx playwright test landing-page.spec.ts
??? ??
?? ??:
npx playwright test --debug
?? ??? ?? ??? ?? ?? ?????.
npx playwright codegen https://leapcell.io/
?? ????? ???? ?? ???? ??????.
// Text input await page.getByRole('textbox').fill('Peter');
?? ??
locator.type() ???? ??? ??? ??????? keydown, keyup ? keypress ???? ??????.
await page.getByLabel('I agree to the terms above').check(); expect(await page.getByLabel('Subscribe to newsletter').isChecked()).toBeTruthy(); // Uncheck await page.getByLabel('XL').setChecked(false);
?? ?
?? ??? locator.press()? ?????.
// Select by value await page.getByLabel('Choose a color').selectOption('blue'); // Select by label await page.getByLabel('Choose a color').selectOption({ label: 'Blue' }); // Multi-select await page.getByLabel('Choose multiple colors').selectOption(['red', 'green', 'blue']);
???? ??? Backquote, Minus, Equal, ????, ?????, Tab, Delete, Escape, ArrowDown, End, Enter, Home, Insert, PageDown, PageUp, ArrowRight, ArrowUp, F1-F12, Digit0-Digit9 ? KeyA? ?????. -KeyZ.
?? ???
???? ??? ????? locator.setInputFiles()? ?????. ?? ??? ?????:
// Left click await page.getByRole('button').click(); // Double click await page.getByText('Item').dblclick(); // Right click await page.getByText('Item').click({ button: 'right' }); // Shift+click await page.getByText('Item').click({ modifiers: ['Shift'] }); // Hover await page.getByText('Item').hover(); // Click at specific position await page.getByText('Item').click({ position: { x: 0, y: 0 } });
?? ??
??? ??? ???? locator.focus()? ?????.
# Using npm npm init playwright@latest # Using yarn yarn create playwright
??? ? ??
??? ? ?? ?????? ?? ? ??? ?????.
- ??? ??? ?? ?? ???? ?????.
- ??? ?? ??? ????.
- ???? ??? ??? ?????.
- ??? ?? ??? ????.
locator.dragTo() ???? ??? ? ????:
playwright.config.ts # PlayWright configuration file package.json # Node.js configuration file package-lock.json # Node.js dependency lock file tests/ # Your test directory example.spec.ts # Template test case tests-examples/ # Example tests directory demo-todo-app.spec.ts # Example test case
?? ????? ???? ?????.
npx playwright test
???? ??
????? Playwright? ??, ??, ????? ?? ?? ??? ???? ?????. ??? ????? ?? ???? ?? ??? ? ????.
Running 6 tests using 6 workers 6 passed (10s) To open the last HTML report run: npx playwright show-report
? ??? ??
? ???? ???? ?? ???? ???? ??? ? ????.
import { test, expect } from '@playwright/test'; test('has title', async ({ page }) => { await page.goto('https://playwright.dev/'); await expect(page).toHaveTitle(/Playwright/); }); test('get started link', async ({ page }) => { await page.goto('https://playwright.dev/'); await page.getByRole('link', { name: 'Get started' }).click(); await expect(page).toHaveURL(/.*intro/); });
???? ?? ??? ???: Leapcell
Leapcell? ?? ????????? ??? ?? ???? ??? ??????. ?? ??? ?? ??? ??? ???? ??? ???? ???? ??? ?????.
??? ??????? ?? Leapcell? ??? ??
-
?? ???
- ???: ???? ?? ???? ??? ??? ???? ?? ???? ???? ?????.
- ?? ??: ?? ??, getdeploying.com? ??? ??? ?? ???? ????? vCPU 1?? RAM 2GB ?? ??? ???? ??? ? 25?? ?????. Leapcell??? 25??? 60ms? ?? ?? ???? 694? ?? ??? ???? ???? ??? ? ?? ?? ?? ? ?? ??? ?????.
-
??? ??
- ?? ???: ???? ?? ?? ??? ?? ???? ?????.
- ???: ??, ???, ??? ??????.
- ??? ??: Go, Python, Node.js, Rust ?? ?????.
-
??? ? ??
- ?? ??: ???? ???? ???? ??? ??? ?????.
- ??? ???: ???? ?? ??? ?? ?????.
- ??? ??: ??? ??? ??? ?? ?? ??? ?? ???? ?????.
? ?? ?? ??? ??? ???? ?????.
? ??? ???: ? UI ??? ??? ?????? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

JavaScript? ??? ?? ????? ??? ?? ??? ??? ?? ?? ?? ????? ?? ???? ???? ?????. ??? ?? ???? ?? ??? ?? ??? ???? ???? ?? ?? ???? ???? ?????. ?? ??, ??? ? ?? ???? ??? (? : ??? null? ??) ?? ??? ????? ??????. ??? ??? ???? ??? ??? ????. closure?? ?? ??? ?? ??; ? ??? ??? ?? ?? ???? ?? ???? ????. V8 ??? ?? ???, ?? ??, ??/?? ???? ?? ??? ?? ??? ??? ????? ?? ??? ?? ??? ????. ?? ?? ???? ??? ??? ??? ??? ???? ????? ?? ?? ???? ?? ???????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

?? JavaScript ??? ??? ??? ?????? ?? ??? ?? ?? ??? ?? ???? ????. 1. ??? ???? ???? ?? ??? ?? ? ? ???? ??? ??? ?? ? ?? ????? ?????. 2. Angular? ?????? ??? ?? ???? ? ?? ?? ??? ??? ??? ???? ?????. 3. VUE? ???? ?? ??? ???? ?? ?? ??? ?????. ?? ?? ?? ??, ? ??, ???? ???? ? SSR? ???? ??? ??? ??? ???? ? ??? ?????. ???, ??? ??? ??? ????? ????. ??? ??? ??? ??? ?? ????.

iife (?? invokedfunctionexpression)? ?? ??? ???? ?? ????? ??? ???? ?? ??? ????? ?? ??? ? ?????. ??? ?? ?? ??? ???? ? ?? ??? ??? ?? (function () {/code/}) ();. ?? ???? ??? ?????. 1. ?? ??? ??? ?? ???? ?? ??? ??? ?????. 2. ?? ??? ??? ???? ?? ?? ??? ????. 3. ?? ?? ??? ????? ?? ???? ???????? ?? ? ??. ???? ?? ???? ?? ??? ES6 ??? ??? ??? ?? ? ??? ????? ??? ? ???? ???????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.
