codeceptjs / codeceptjs/CodeceptJS

Chrome/firefox/safari- browser does not auto-start on macOS unless Selenium Standalone is manually launched

Đang mở
#5,338 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
stale
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

Please share the macOS-supported codecept.conf.js file. With the current configuration below, the local automation does not automatically start ChromeDriver on macOS
Error | Error: Can't connect to WebDriver
We need to explicitly start standalone Selenium to launch the browser

node version-v14.15.5
npm version-6.14.5

exports.config = {
tests: "./*_test.js",
output: "./output",
/** -----------------------------
* :rocket: HELPERS
* ----------------------------- */
helpers: {
WebDriver: {
url: prop.url,
browser: browser,
restart: false,
smartWait: 10000,
waitForTimeout: 50000,
windowSize: windowSize,
/** Auto-start ChromeDriver on Mac */
services: ["chromedriver"],
capabilities: {
acceptInsecureCerts: true,
'goog:chromeOptions': {
excludeSwitches: ['enable-automation'],
prefs: {
download: {
default_directory: prop.downloadDir,
prompt_for_download: false
}
}
}
}
},
/** Custom Helpers */
ChaiWrapper: {
require: "codeceptjs-chai",
},
MyHelper: {
require: "./myHelper.js",
},
},
/** -----------------------------
* BOOTSTRAP + TEARDOWN
* ----------------------------- */
bootstrap: require("./dist/Bootstrap/bootstrap.js").bootstrap,
teardown: require("./dist/Bootstrap/bootstrap.js").teardown,
teardownAll: require("./src/get_all_reports.js"),
include: {
I: prop.stepFilePath,
},
/** -----------------------------
* PARALLEL EXECUTION
* ----------------------------- */
multiple: {
parallel: { chunks: 1 },
sanityCases: { chunks: 2 }
},
/** -----------------------------
* BDD (Gherkin)
* ----------------------------- */
gherkin: {
features: [
'./src/**/features/**/**.feature',
"./src/**/src/**/**/*.feature"
],
steps: "./dist/**/implementation/**/**/*.js"
},
name: prop.projectName,
/** -----------------------------
* PLUGINS
* ----------------------------- */
plugins: {
xpathValidate: {
require: "./src/xpathValidation.js",
enabled: true
},
retryFailedStep: { enabled: true },
tryTo: { enabled: true },
screenshotOnFail: {
enabled: true,
uniqueScreenshotNames: true
},
/** :x: WDIO plugin is removed – not needed */
// wdio: { ... } → deleted
autoDelay: {
enabled: true,
delayBefore: 1000,
delayAfter: 500,
methods: ['click', 'fillField', 'checkOption']
},
allure: {
enabled: true,
require: '@codeceptjs/allure-legacy'
},
selenoidOptions: {
sessionTimeout: "300s",
enableVNC: false,
enableVideo: false
},
require: ["ts-node/register"]
}
};

@danielrentz @davert

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.