Skip to content

Commit 8a3d053

Browse files
Merge pull request #131 from gemini-testing/TESTPLANE-1022.devtools
docs: purge devtools
2 parents 2f77a17 + 84bcc38 commit 8a3d053

10 files changed

Lines changed: 78 additions & 44 deletions

File tree

docs/guides/how-to-use-cdp.mdx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,24 @@ For a comparison of the _WebDriver_ and _CDP_ protocols, see the "WebDriver vs C
2424

2525
## Local Usage {#local_usage}
2626

27-
To work with the browser via CDP locally, add the `automationProtocol: 'devtools'` option to the browser settings in the Testplane config:
27+
<Admonition type="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:
2835

2936
```javascript
3037
// .testplane.conf.js
3138

3239
module.exports = {
3340
browsers: {
3441
chrome: {
35-
automationProtocol: "devtools",
42+
gridUrl: "local",
3643
desiredCapabilities: {
44+
browserName: "chrome",
3745
// ...
3846
},
3947
},
@@ -47,17 +55,15 @@ module.exports = {
4755

4856
After this, all subsequent runs will be performed in your locally installed Chrome.
4957

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:
5159

5260
```bash
53-
testplane_browsers_chrome_automation_protocol=devtools npx testplane ...
61+
npx testplane ... --local
5462
```
5563

56-
Or set it as a CLI option:
64+
See the [Running on Local Browsers](/blog/local-browsers-intro) blog post for a step-by-step guide.
5765

58-
```bash
59-
npx testplane ... --browsers-chrome-automation-protocol=devtools
60-
```
66+
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.
6167

6268
## Remote Usage {#remote_usage}
6369

docs/quickstart/running-tests.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 3
33
---
44

5-
import Admonition from "@theme/Admonition";
6-
75
# Running and Debugging
86

97
## Running tests
@@ -152,22 +150,20 @@ npx testplane gui
152150

153151
In the GUI you will see test execution in real time, screenshots, and errors. You can restart individual tests and observe their execution.
154152

155-
### Local browser with DevTools
153+
### Visible local browser
156154

157-
For debugging, you can open a visible browser window with DevTools:
155+
For debugging, you can open a visible browser window:
158156

159157
```bash
160-
npx testplane --local --devtools --headless false --grep "Test name"
158+
npx testplane --local --headless false --grep "Test name"
161159
```
162160

163161
What will happen:
164162

165-
1. A visible browser window will open
166-
2. Chrome DevTools will automatically open
163+
1. Testplane will download the browser and driver if needed (`--local` is the same as `gridUrl: "local"` in the config)
164+
2. A visible browser window will open
167165
3. You can observe the test execution
168166

169-
<Admonition type="warning">Firefox browser does not support DevTools.</Admonition>
170-
171167
### REPL mode
172168

173169
REPL (Read-Eval-Print Loop) is an interactive console for executing browser commands during a test. There are several ways to enter REPL:

docs/reference/cli.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Main command to run tests.
3030
--repl [type] run one test, call `browser.switchToRepl` in test code to open repl interface (default: false)
3131
--repl-before-test [type] open repl interface before test run (default: false)
3232
--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
3433
--local use automatically downloaded browsers and drivers, provided by Testplane
3534
--keep-browser do not close browser session after test completion
3635
--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:
256255
257256
#### Devtools {#testplane-devtools}
258257
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).
260260
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.
264+
265+
</Admonition>
264266
265267
#### Help {#testplane-help}
266268
@@ -771,3 +773,4 @@ TESTPLANE_SETS=desktop,touch testplane
771773
[add-tag]: ../../commands/browser/addTag
772774
[switch-to-repl]: ../../commands/browser/switchToRepl
773775
[webdriver-vs-cdp]: ../webdriver-vs-cdp
776+
[how-to-use-cdp]: ../../guides/how-to-use-cdp

docs/reference/config/_partials/examples/_config-example.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export default {
1010

1111
browsers: {
1212
chrome: {
13+
gridUrl: "local",
14+
headless: true,
1315
desiredCapabilities: {
1416
browserName: "chrome",
15-
automationProtocol: "devtools",
16-
headless: true,
1717
},
1818
},
1919
},

docs/reference/config/browsers.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ Default value: `null`. It means that Testplane will try to determine the websock
165165

166166
Protocol for communication with the browser. Available values: `webdriver` and `devtools`. See also [WebDriver vs CDP](../../webdriver-vs-cdp). Default: `webdriver`.
167167

168+
<Admonition type="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+
168177
### sessionEnvFlags {#session_env_flags}
169178

170179
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.

i18n/ru/docusaurus-plugin-content-docs/current/guides/how-to-use-cdp.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,24 @@ import Admonition from "@theme/Admonition";
2222

2323
## Локальное использование {#local_usage}
2424

25-
Для работы с браузером по CDP локально — добавьте опцию `automationProtocol: 'devtools'` к настройкам браузера в конфиге testplane:
25+
<Admonition type="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:
2633

2734
```javascript
2835
// .testplane.conf.js
2936

3037
module.exports = {
3138
browsers: {
3239
chrome: {
33-
automationProtocol: "devtools",
40+
gridUrl: "local",
3441
desiredCapabilities: {
42+
browserName: "chrome",
3543
// ...
3644
},
3745
},
@@ -45,12 +53,16 @@ module.exports = {
4553

4654
После этого все последующие запуски будут выполняться в вашем локально установленном Хроме.
4755

48-
Но если вам нужно запустить браузер с поддержкой CDP один раз, то удобнее использовать специальную CLI-опцию:
56+
Если вам нужно запустить тесты на локальном браузере однократно, передайте CLI-опцию `--local`:
4957

5058
```bash
51-
npx testplane ... --devtools
59+
npx testplane ... --local
5260
```
5361

62+
Подробная пошаговая инструкция есть в блог-посте [Запуск на локальных браузерах](/blog/local-browsers-intro).
63+
64+
После того как браузер поднят локально по WebDriver, в тесте по-прежнему можно вызывать [CDP-команды][how-to-intercept-requests-and-responses] так же, как описано в секции [Удалённое использование](#remote_usage).
65+
5466
## Удаленное использование {#remote_usage}
5567

5668
При использовании CDP на удаленной машине (например, в гриде) testplane сначала поднимет браузер с использованием WebDriver-протокола и только потом, по запросу пользователя (т. е. при вызове CDP-команды), перейдет на подключение по CDP. Таким образом, с удаленным браузером в одном тестовом сценарии мы будем общаться сразу по двум протоколам.

i18n/ru/docusaurus-plugin-content-docs/current/quickstart/running-tests.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 3
33
---
44

5-
import Admonition from "@theme/Admonition";
6-
75
# Запуск и отладка
86

97
## Запуск тестов
@@ -152,22 +150,20 @@ npx testplane gui
152150

153151
В GUI вы увидите выполнение тестов в реальном времени, скриншоты и ошибки. Можно перезапускать отдельные тесты и наблюдать за их выполнением.
154152

155-
### Локальный браузер с DevTools
153+
### Видимый локальный браузер
156154

157-
Для отладки можно открыть видимое окно браузера с DevTools:
155+
Для отладки можно открыть видимое окно браузера:
158156

159157
```bash
160-
npx testplane --local --devtools --headless false --grep "Название теста"
158+
npx testplane --local --headless false --grep "Название теста"
161159
```
162160

163161
Что произойдет:
164162

165-
1. Откроется видимое окно браузера
166-
2. Автоматически откроются Chrome DevTools
163+
1. Testplane при необходимости скачает браузер и драйвер (`--local` эквивалентен `gridUrl: "local"` в конфиге)
164+
2. Откроется видимое окно браузера
167165
3. Вы сможете наблюдать за выполнением теста
168166

169-
<Admonition type="warning">В браузере Firefox нет поддержки DevTools.</Admonition>
170-
171167
### REPL-режим
172168

173169
REPL (Read-Eval-Print Loop) — интерактивная консоль для выполнения команд браузера во время теста. Есть несколько способов войти в REPL:

i18n/ru/docusaurus-plugin-content-docs/current/reference/cli.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import Version from "../_partials/specs/version.mdx";
3030
--repl [type] run one test, call `browser.switchToRepl` in test code to open repl interface (default: false)
3131
--repl-before-test [type] open repl interface before test run (default: false)
3232
--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
3433
--local use automatically downloaded browsers and drivers, provided by Testplane
3534
--keep-browser do not close browser session after test completion
3635
--keep-browser-on-fail do not close browser session when test fails
@@ -257,11 +256,14 @@ testplane --repl --grep 'my test name' --browser chrome
257256
258257
#### Devtools {#testplane-devtools}
259258
260-
Запускает тесты 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"` (оно же и значение по умолчанию).
261261
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].
265+
266+
</Admonition>
265267
266268
#### Help {#testplane-help}
267269
@@ -772,3 +774,4 @@ TESTPLANE_SETS=desktop,touch testplane
772774
[add-tag]: ../../commands/browser/addTag
773775
[switch-to-repl]: ../../commands/browser/switchToRepl
774776
[webdriver-vs-cdp]: ../webdriver-vs-cdp
777+
[how-to-use-cdp]: ../../guides/how-to-use-cdp

i18n/ru/docusaurus-plugin-content-docs/current/reference/config/_partials/examples/_config-example.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export default {
1010

1111
browsers: {
1212
chrome: {
13+
gridUrl: "local",
14+
headless: "new",
1315
desiredCapabilities: {
1416
browserName: "chrome",
15-
automationProtocol: "devtools",
16-
headless: true,
1717
},
1818
},
1919
},

i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ URL грида (адрес, на котором слушает ChromeDriver/Sele
163163

164164
Протокол общения с браузером. Доступные значения: `webdriver` и `devtools`. См. также [WebDriver vs CDP](../../webdriver-vs-cdp). По умолчанию: `webdriver`.
165165

166+
<Admonition type="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+
166175
### sessionEnvFlags {#session_env_flags}
167176

168177
Флаги окружения задают протоколы, которые будут использоваться в созданной сессии браузера. По умолчанию флаги окружения автоматически устанавливаются в соответствии с заданными `desiredCapabilities`. Однако в редких случаях они могут принимать некорректные значения и тогда с помощью этой опции их можно будет задать явно.

0 commit comments

Comments
 (0)