From 337d8daba87d5749e553f8b1d85768214a7a415c Mon Sep 17 00:00:00 2001 From: damar Zaky Date: Sun, 14 Jul 2024 17:03:51 +0700 Subject: [PATCH] docs(library-js.md): Improve grammar Signed-off-by: damar Zaky --- docs/src/library-js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/library-js.md b/docs/src/library-js.md index ae3d1916ec..9085290bba 100644 --- a/docs/src/library-js.md +++ b/docs/src/library-js.md @@ -103,7 +103,7 @@ The key differences to note are as follows: | Installation | `npm install playwright` | `npm init playwright@latest` - note `install` vs. `init` | | Install browsers | Install `@playwright/browser-chromium`, `@playwright/browser-firefox` and/or `@playwright/browser-webkit` | `npx playwright install` or `npx playwright install chromium` for a single one | | `import` from | `playwright` | `@playwright/test` | -| Initialization | Explicitly need to:
  1. Pick a browser to use, e.g. `chromium`
  2. Launch browser with [`method: BrowserType.launch`]
  3. Create a context with [`method: Browser.newContext`], and pass any context options explicitly, e.g. `devices['iPhone 11']`
  4. Create a page with [`method: BrowserContext.newPage`]
| An isolated `page` and `context` are provided to each test out-of the box, along with other [built-in fixtures](./test-fixtures.md#built-in-fixtures). No explicit creation. If referenced by the test in it's arguments, the Test Runner will create them for the test. (i.e. lazy-initialization) | +| Initialization | Explicitly need to:
  1. Pick a browser to use, e.g. `chromium`
  2. Launch browser with [`method: BrowserType.launch`]
  3. Create a context with [`method: Browser.newContext`], and pass any context options explicitly, e.g. `devices['iPhone 11']`
  4. Create a page with [`method: BrowserContext.newPage`]
| An isolated `page` and `context` are provided to each test out-of the box, along with other [built-in fixtures](./test-fixtures.md#built-in-fixtures). No explicit creation. If referenced by the test in its arguments, the Test Runner will create them for the test. (i.e. lazy-initialization) | | Assertions | No built-in Web-First Assertions | [Web-First assertions](./test-assertions.md) like: which auto-wait and retry for the condition to be met.| | Cleanup | Explicitly need to:
  1. Close context with [`method: BrowserContext.close`]
  2. Close browser with [`method: Browser.close`]
| No explicit close of [built-in fixtures](./test-fixtures.md#built-in-fixtures); the Test Runner will take care of it. | Running | When using the Library, you run the code as a node script, possibly with some compilation first. | When using the Test Runner, you use the `npx playwright test` command. Along with your [config](./test-configuration.md), the Test Runner handles any compilation and choosing what to run and how to run it. |