You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/how-to-use-cdp.mdx
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,24 @@ For a comparison of the _WebDriver_ and _CDP_ protocols, see the "WebDriver vs C
24
24
25
25
## Local Usage {#local_usage}
26
26
27
-
To work with the browser via CDP locally, add the `automationProtocol: 'devtools'` option to the browser settings in the Testplane config:
27
+
<Admonitiontype="danger"title="Removed in Testplane 9">
28
+
Starting from **Testplane 9**, the value `"devtools"` for the `automationProtocol` option (as well as the `--devtools` CLI flag) has been **removed**. It caused a number of hard-to-reproduce errors that never occurred with `automationProtocol: "webdriver"`, and the underlying [WebdriverIO](https://webdriver.io) — on which Testplane is based — has also dropped its `devtools` automation protocol. The only supported value is now `"webdriver"` (which is also the default).
29
+
30
+
Note that this does **not** deprecate the Chrome DevTools Protocol itself: you can still use CDP directly (see the [Remote Usage](#remote_usage) section below and the rest of this page). Only the `devtools` automation protocol provided by WebdriverIO has been removed.
31
+
32
+
</Admonition>
33
+
34
+
To run your tests in a locally installed browser, use `gridUrl: "local"` (or the `--local` CLI flag) — Testplane will automatically download the required browsers and drivers and launch them via WebDriver:
28
35
29
36
```javascript
30
37
// .testplane.conf.js
31
38
32
39
module.exports= {
33
40
browsers: {
34
41
chrome: {
35
-
automationProtocol:"devtools",
42
+
gridUrl:"local",
36
43
desiredCapabilities: {
44
+
browserName:"chrome",
37
45
// ...
38
46
},
39
47
},
@@ -47,17 +55,15 @@ module.exports = {
47
55
48
56
After this, all subsequent runs will be performed in your locally installed Chrome.
49
57
50
-
But if you need to run a browser with CDP support just once, it's more convenient to override this option using an environment variable:
58
+
If you need to launch tests on a local browser just once, you can pass the `--local` CLI option instead:
Once the browser is started locally via WebDriver, you can still call [CDP commands][how-to-intercept-requests-and-responses] inside the test as described in the [Remote Usage](#remote_usage) section.
Copy file name to clipboardExpand all lines: docs/reference/cli.mdx
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,6 @@ Main command to run tests.
30
30
--repl [type] run one test, call `browser.switchToRepl`intest code to open repl interface (default: false)
31
31
--repl-before-test [type] open repl interface before test run (default: false)
32
32
--repl-on-fail [type] open repl interface on test fail only (default: false)
33
-
--devtools switches the browser to the devtools mode with using CDP protocol
34
33
--local use automatically downloaded browsers and drivers, provided by Testplane
35
34
--keep-browser do not close browser session after test completion
36
35
--keep-browser-on-fail do not close browser session when test fails
@@ -256,11 +255,14 @@ Example of console output with connection information to the browser:
256
255
257
256
#### Devtools {#testplane-devtools}
258
257
259
-
Runs Testplane tests using [devtools automation protocol][webdriver-vs-cdp].
258
+
<Admonition type="danger" title="Removed in Testplane 9">
259
+
The `--devtools` CLI option (and the corresponding `automationProtocol: "devtools"` value) was **removed** in Testplane 9. The `devtools` automation protocol — provided by WebdriverIO — caused a number of hard-to-reproduce issues that never occurred under WebDriver, and WebdriverIO has also dropped its `devtools` automation protocol. The only supported value of `automationProtocol` is now `"webdriver"` (the default).
260
260
261
-
```bash
262
-
testplane --devtools
263
-
```
261
+
To run tests in a locally installed browser, use `gridUrl: "local"` in the [config](../config/browsers#automation_protocol) or the `--local` CLI option. See [Running on Local Browsers](/blog/local-browsers-intro) for details.
262
+
263
+
Note: this does not deprecate the Chrome DevTools Protocol itself — you can still use it directly from tests, see the [How to Use Chrome DevTools Protocol][how-to-use-cdp] guide.
Copy file name to clipboardExpand all lines: docs/reference/config/browsers.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,15 @@ Default value: `null`. It means that Testplane will try to determine the websock
165
165
166
166
Protocol for communication with the browser. Available values: `webdriver` and `devtools`. See also [WebDriver vs CDP](../../webdriver-vs-cdp). Default: `webdriver`.
167
167
168
+
<Admonitiontype="danger"title="Removed in Testplane 9">
169
+
Starting from **Testplane 9**, the value `"devtools"` has been **removed**. It caused a number of hard-to-reproduce errors that never occurred under `"webdriver"`, and the underlying [WebdriverIO](https://webdriver.io) has also dropped its `devtools` automation protocol. The only supported value is now `"webdriver"`.
170
+
171
+
To launch tests in a locally installed browser, use [`gridUrl: "local"`](#grid_url) instead — Testplane will automatically download the required browser and driver and start it via WebDriver. See the [Running on Local Browsers](/blog/local-browsers-intro) blog post for a step-by-step guide.
172
+
173
+
This change does **not** affect the Chrome DevTools Protocol itself — you can still use CDP from your tests, see the [How to Use Chrome DevTools Protocol][how-to-use-cdp] guide.
174
+
175
+
</Admonition>
176
+
168
177
### sessionEnvFlags {#session_env_flags}
169
178
170
179
Environment flags set the protocols that will be used in the created browser session. By default, environment flags are automatically set according to the specified `desiredCapabilities`. However, in rare cases, they may have incorrect values and can be explicitly set using this option.
Copy file name to clipboardExpand all lines: i18n/ru/docusaurus-plugin-content-docs/current/guides/how-to-use-cdp.mdx
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,24 @@ import Admonition from "@theme/Admonition";
22
22
23
23
## Локальное использование {#local_usage}
24
24
25
-
Для работы с браузером по CDP локально — добавьте опцию `automationProtocol: 'devtools'` к настройкам браузера в конфиге testplane:
25
+
<Admonitiontype="danger"title="Удалено в Testplane 9">
26
+
Начиная с **Testplane 9** значение `"devtools"` у опции `automationProtocol` (а также CLI-флаг `--devtools`) **удалены**. Этот режим вызывал ряд трудновоспроизводимых ошибок, которых не было при `automationProtocol: "webdriver"`, и в [WebdriverIO](https://webdriver.io), на котором основан Testplane, протокол автоматизации `devtools` также был удалён. Единственное поддерживаемое значение теперь — `"webdriver"` (оно же и значение по умолчанию).
27
+
28
+
Это **не** означает отказ от самого Chrome DevTools Protocol: вы по-прежнему можете напрямую использовать CDP (см. секцию [Удалённое использование](#remote_usage) ниже и остальную часть этой страницы). Удалён только режим автоматизации `devtools`, который ранее предоставлял WebdriverIO.
29
+
30
+
</Admonition>
31
+
32
+
Чтобы запустить тесты в локально установленном браузере, укажите `gridUrl: "local"` (или передайте CLI-флаг `--local`) — Testplane сам скачает необходимые браузеры и драйверы и запустит их по протоколу WebDriver:
26
33
27
34
```javascript
28
35
// .testplane.conf.js
29
36
30
37
module.exports= {
31
38
browsers: {
32
39
chrome: {
33
-
automationProtocol:"devtools",
40
+
gridUrl:"local",
34
41
desiredCapabilities: {
42
+
browserName:"chrome",
35
43
// ...
36
44
},
37
45
},
@@ -45,12 +53,16 @@ module.exports = {
45
53
46
54
После этого все последующие запуски будут выполняться в вашем локально установленном Хроме.
47
55
48
-
Но если вам нужно запустить браузер с поддержкой CDP один раз, то удобнее использовать специальную CLI-опцию:
56
+
Если вам нужно запустить тесты на локальном браузере однократно, передайте CLI-опцию`--local`:
49
57
50
58
```bash
51
-
npx testplane ... --devtools
59
+
npx testplane ... --local
52
60
```
53
61
62
+
Подробная пошаговая инструкция есть в блог-посте [Запуск на локальных браузерах](/blog/local-browsers-intro).
63
+
64
+
После того как браузер поднят локально по WebDriver, в тесте по-прежнему можно вызывать [CDP-команды][how-to-intercept-requests-and-responses] так же, как описано в секции [Удалённое использование](#remote_usage).
65
+
54
66
## Удаленное использование {#remote_usage}
55
67
56
68
При использовании CDP на удаленной машине (например, в гриде) testplane сначала поднимет браузер с использованием WebDriver-протокола и только потом, по запросу пользователя (т. е. при вызове CDP-команды), перейдет на подключение по CDP. Таким образом, с удаленным браузером в одном тестовом сценарии мы будем общаться сразу по двум протоколам.
Запускает тесты Testplane с использованием [протокола автоматизации devtools][webdriver-vs-cdp].
259
+
<Admonition type="danger" title="Удалено в Testplane 9">
260
+
CLI-опция `--devtools` (и соответствующее ей значение `automationProtocol: "devtools"`) **удалена** в Testplane 9. Протокол автоматизации `devtools`, который предоставлял WebdriverIO, вызывал ряд трудновоспроизводимых ошибок, которых не было при использовании WebDriver, и в самом WebdriverIO протокол автоматизации `devtools` тоже был удалён. Единственным поддерживаемым значением `automationProtocol` теперь является `"webdriver"` (оно же и значение по умолчанию).
261
261
262
-
```bash
263
-
testplane --devtools
264
-
```
262
+
Чтобы запустить тесты в локально установленном браузере, используйте `gridUrl: "local"` в [конфиге](../config/browsers#automation_protocol) или CLI-опцию `--local`. Подробности — в блог-посте [Запуск на локальных браузерах](/blog/local-browsers-intro).
263
+
264
+
Обратите внимание: это не означает отказ от самого Chrome DevTools Protocol — вы по-прежнему можете напрямую использовать CDP в тестах, см. рецепт [Как использовать Chrome DevTools Protocol в testplane][how-to-use-cdp].
Copy file name to clipboardExpand all lines: i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,6 +163,15 @@ URL грида (адрес, на котором слушает ChromeDriver/Sele
163
163
164
164
Протокол общения с браузером. Доступные значения: `webdriver` и `devtools`. См. также [WebDriver vs CDP](../../webdriver-vs-cdp). По умолчанию: `webdriver`.
165
165
166
+
<Admonitiontype="danger"title="Удалено в Testplane 9">
167
+
Начиная с **Testplane 9** значение `"devtools"`**удалено**. Этот режим вызывал ряд трудновоспроизводимых ошибок, которых не было при `"webdriver"`, и в [WebdriverIO](https://webdriver.io), на котором основан Testplane, протокол автоматизации `devtools` также был удалён. Единственное поддерживаемое значение теперь — `"webdriver"`.
168
+
169
+
Чтобы запустить тесты в локально установленном браузере, используйте [`gridUrl: "local"`](#grid_url) — Testplane сам скачает нужный браузер и драйвер и запустит его по протоколу WebDriver. Пошаговая инструкция есть в блог-посте [Запуск на локальных браузерах](/blog/local-browsers-intro).
170
+
171
+
Это изменение **не** касается самого Chrome DevTools Protocol — вы по-прежнему можете использовать CDP в тестах, см. рецепт [Как использовать Chrome DevTools Protocol в testplane][how-to-use-cdp].
172
+
173
+
</Admonition>
174
+
166
175
### sessionEnvFlags {#session_env_flags}
167
176
168
177
Флаги окружения задают протоколы, которые будут использоваться в созданной сессии браузера. По умолчанию флаги окружения автоматически устанавливаются в соответствии с заданными `desiredCapabilities`. Однако в редких случаях они могут принимать некорректные значения и тогда с помощью этой опции их можно будет задать явно.
0 commit comments