Skip to content

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

docs: update init script type for java and C# (#5449)

Yury Semikhatsky7e7d3db96d6a
diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md
index 7d6b2fead0..839b8de1e4 100644
--- a/docs/src/api/class-browsercontext.md
+++ b/docs/src/api/class-browsercontext.md
@@ -153,6 +153,7 @@ The order of evaluation of multiple scripts installed via [`method: BrowserConte
:::
### param: BrowserContext.addInitScript.script
+* langs: js
- `script` <[function]|[string]|[Object]>
- `path` <[path]> Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the
current working directory. Optional.
@@ -160,6 +161,12 @@ The order of evaluation of multiple scripts installed via [`method: BrowserConte
Script to be evaluated in all pages in the browser context.
+### param: BrowserContext.addInitScript.script
+* langs: csharp, java
+- `script` <[string]|[path]>
+
+Script to be evaluated in all pages in the browser context.
+
### param: BrowserContext.addInitScript.arg
* langs: js
- `arg` <[Serializable]>
diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md
index 10e2950e2b..11fa11342a 100644
--- a/docs/src/api/class-page.md
+++ b/docs/src/api/class-page.md
@@ -357,6 +357,7 @@ The order of evaluation of multiple scripts installed via [`method: BrowserConte
:::
### param: Page.addInitScript.script
+* langs: js
- `script` <[function]|[string]|[Object]>
- `path` <[path]> Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the
current working directory. Optional.
@@ -364,6 +365,12 @@ The order of evaluation of multiple scripts installed via [`method: BrowserConte
Script to be evaluated in the page.
+### param: Page.addInitScript.script
+* langs: csharp, java
+- `script` <[string]|[path]>
+
+Script to be evaluated in all pages in the browser context.
+
### param: Page.addInitScript.arg
* langs: js
- `arg` <[Serializable]>