Visual service and appium-windows-driver are not working together for iOS
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- mobile-dev, testing-qa
Hướng nghiên cứu
Bản tái hiện được liên kết từ issue và cấu hình bị lỗi là wdio.conf.winappdriver.js; trước tiên hãy chạy ví dụ đó với các phiên bản Node.js và package được liệt kê. Truy vết lỗi qua ConfigParser.js của @wdio/config và xác lập hành vi mong đợi có thể tái hiện cho Visual service với thiết lập Windows/Appium; issue không định nghĩa một kết quả thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment (please complete the following information):
- Node.js version: v18.16.0
- NPM version: 9.5.1
- Browser name and version: we use winAppDriver
- Platform name and version: Windows 10
- WebdriverIO version: [e.g. 5.1.0]
@wdio/visual-serviceversion: [e.g. 1.0.0]
"devDependencies": {
"@types/jasmine": "^3.4.1",
"@types/node": "^12.20.55",
"@wdio/appium-service": "^5.12.1",
"@wdio/cli": "^5.10.1",
"@wdio/dot-reporter": "5.13.2",
"@wdio/jasmine-framework": "^5.12.1",
"@wdio/junit-reporter": "^5.12.1",
"@wdio/local-runner": "^5.10.1",
"@wdio/visual-service": "^3.0.2",
"appium": "1.15.0",
"canvas": "^2.11.2",
"prettier": "^1.18.2",
"rimraf": "3.0.0",
"ts-node": "^8.4.1",
"tsconfig-paths": "^3.8.0",
Config of WebdriverIO + @wdio/visual-service
An example of how you configured the @wdio/visual-service
const { join } = require('path');
exports.config = {
// ...
// =====
// Setup
// =====
services: [
['visual', {
// Some options, see the docs for more
baselineFolder: join(process.cwd(), 'tests', 'baseline'),
formatImageName: '{tag}-{logName}-{width}x{height}',
screenshotPath: join(process.cwd(), 'tmp'),
savePerInstance: true,
autoSaveBaseline: true,
blockOutStatusBar: true,
blockOutToolBar: true,
// NOTE: When you are testing a hybrid app please use this setting
isHybridApp: false,
// Options for the tabbing image
tabbableOptions: {
circle: {
size: 18,
fontSize: 18,
// ...
},
line: {
color: "#ff221a", // hex-code or for example words like red|black|green
width: 3,
},
},
// ... more options
}]
],
Describe the bug
An error is thrown when running the tests
To Reproduce
Steps to reproduce the behavior:
[Include code or an example repository that can easily be set up]
Expected behavior
A clear and concise description of what you expected to happen.
Log
2024-02-19T16:39:10.502Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: C:\Users\dubli\OneDrive\Des
ktop\1\JavaScript\packages\webdriverio\wdio.conf.winappdriver.js: require() of ES Module C:\Users\dubli\OneDrive\Desktop
\1\JavaScript\packages\webdriverio\wdio.conf.winappdriver.js from C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modu
les@wdio\config\build\lib\ConfigParser.js not supported.
wdio.conf.winappdriver.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains
"type": "module" which declares all .js files in that package scope as ES modules.
Instead rename wdio.conf.winappdriver.js to end in .cjs, change the requiring code to use dynamic import() which is avai
lable in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\dubli\OneDrive\Desktop\1\Jav
aScript\packages\webdriverio\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\config\build\lib\ConfigParser.js:43
var fileConfig = (0, _deepmerge.default)(require(filePath).config, {}, MERGE_OPTIONS);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\dubli\OneDrive\Desktop\1\JavaScript\packages\webdriverio\wdio.c
onf.winappdriver.js from C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\config\build\lib\ConfigParser.j
s not supported.
wdio.conf.winappdriver.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains
"type": "module" which declares all .js files in that package scope as ES modules.
Instead rename wdio.conf.winappdriver.js to end in .cjs, change the requiring code to use dynamic import() which is avai
lable in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\dubli\OneDrive\Desktop\1\Jav
aScript\packages\webdriverio\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
at ConfigParser.addConfigFile (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules\@wdio\config\build\lib\Conf
igParser.js:43:48)
at new Launcher (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\cli\build\launcher.js:33:23)
at launch (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\cli\build\run.js:63:20)
at run (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\cli\build\run.js:45:12)
at Object.run (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\cli\build\index.js:36:20)
at Object. (C:\Users\dubli\OneDrive\Desktop\1\JavaScript\node_modules@wdio\cli\bin\wdio.js:11:21) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.16.0
npm ERR! Lifecycle script test failed with error:
Additional context
Add any other context about the problem here.
- Ngôn ngữ chính
- TypeScript
- Star
- 153
- Fork
- 59
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webdriverio/visual-testing
-
bug third party bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
webdriverio/visual-testing#1127 · 1 bình luận ·
-
help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
webdriverio/visual-testing#985 · 1 bình luận ·
-
iOS screenshot error in JIMP when cropping an image received from AppiumCó thể làm lại được @wswebcreation đã nhận 556 ngày trước và không có pull request nào đang mở. Đang mởbug enhancement
webdriverio/visual-testing#783 · 5 bình luận · 1 người được giao ·
-
Wait for Screenshot to MatchĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
webdriverio/visual-testing#690 ·
-
support for shadowRoot elements in @wdio/visual-service for tab testingCó thể làm lại được @wswebcreation đã nhận 734 ngày trước và không có pull request nào đang mở. Đang mởenhancement
webdriverio/visual-testing#515 · 1 bình luận · 1 người được giao ·
Tất cả issue của webdriverio/visual-testing
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
supabase/agent-skills#611 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
polka-codes/test#345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
GoogleChromeLabs/project-sesame#217 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
solana-foundation/solana-com#2202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100