Я получаю WebDriverError: отключено: получено событие Inspector.detached при запуске испытаний транспортира с Typescript и Cucumber.
Я получаю эту ошибку только для 1-го сценария и другого сценария ios отлично работает Я читал об этой ошибке в других темах, но снова поднял ее здесь, потому что решение, данное в этих темах, не решило мою проблему.
Обратите внимание, что я никогда не пытался открыть devtools, когда выполнялись тесты транспортира.
Ниже приведены подробности зависимости:
"@types/cucumber": "^6.0.0",
"@types/jasmine": "^3.5.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^13.1.6",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"cucumber": "^6.0.5",
"cucumber-html-reporter": "^5.1.0",
"jasmine": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"oracledb": "^4.1.0",
"protractor": "^5.4.2",
"protractor-cucumber-framework": "^6.2.0",
"protractor-html-reporter-2": "^1.0.4",
"ts-node": "^8.6.0",
"typescript": "3.6.2"
Файл конфигурации: "conf.ts"
import { Config } from "protractor";
import * as reporter from "cucumber-html-reporter";
export let config: Config = {
directConnect: true,
framework: "custom",
frameworkPath: require.resolve("protractor-cucumber-framework"),
baseUrl: "http://localhost:4200/",
capabilities: {
browserName: "chrome"
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, '../tsconfig.json') // Relative path of tsconfig.json file
})
},
onComplete: () => {
let options = {
theme: "bootstrap",
jsonFile: './TestReport.json',
output: './TestReport.html',
reportSuiteAsScenarios: true,
scenarioTimestamp: true,
launchReport: true
};
reporter.generate(options);
},
specs: ["../features/*.feature"],
cucumberOpts: {
// require step definitions
require: ["./stepdefinitions/*.js"],
format: "json:TestReport.json"
},
noGlobals: true
};
Журнал ошибок:
WebDriverError: disconnected: received Inspector.detached event
(Session info: chrome=77.0.3865.90)
(Driver info: chromedriver=77.0.3865.10 (bc3579f611bbc73331171afe020ec7a45e6ccc55-refs/branch-heads/3865@{#93}),platform=Windows NT 10.0.17763 x86_64)
at Object.checkLegacyResponse (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\http.js:509:13)
at C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: Protractor.get(http://localhost:4200/) - reset url
at Driver.schedule (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at ProtractorBrowser.executeScriptWithDescription (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\protractor\built\browser.js:404:28)
at C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\protractor\built\browser.js:679:25
at ManagedPromise.invokeCallback_ (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\promise.js:1376:14)
at TaskQueue.execute_ (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\promise.js:2927:27
at C:\Users\r0m01iu\Source\Repos\MERCHSPACE\PG_Flow_Angular8\projects\mod-pg-flow\src\test\node_modules\selenium-webdriver\lib\promise.js:668:7
at processTicksAndRejections (internal/process/task_queues.js:93:5)