Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Can't connect to WebDriver error when running tests on through CLI

Đang mở
#2,859 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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, nodejs
Lĩnh vực
cli, testing-qa

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi với npx codeceptjs run --verbose từ thư mục gốc của dự án bằng cấu hình được cung cấp. Kiểm tra thiết lập WebDriver và selenium-standalone liên quan đến đường dẫn chromedriver được báo cáo và hook before all. Được coi là hoàn tất khi việc chạy kiểm thử bằng CLI không còn thất bại với lỗi ETXTBSY đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What are you trying to achieve?

Try to run tests using CLI.

NOTE: It worth to mention that with my current configuration, I am able to run tests when debugging with my IDE (Visual Studio Code). But same config and test files fails when running npx codeceptjs run on CLI.

What do you get instead?

Error message on CLI.

Provide console output if related. Use --verbose mode for more details.
CodeceptJS v3.0.5
Using test root "/mnt/c/projects/codeceptjs-demo"
Helpers: WebDriver
Plugins: screenshotOnFail, retryFailedStep, tryTo, wdio

test1 --
Error in "uncompressDownloadedFile:readStream.pipe".
See more details below:
ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'
Error in "uncompressDownloadedFile:readStream.pipe".
See more details below:
ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'
[1] Error | Error: ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'
✖ "before all" hook: codeceptjs.beforeSuite for "test 1 @t1" in 1495ms
[1] Error | Error: ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'
Error: ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'
S test 2 @t2

-- FAILURES:

  1. test1
    "before all" hook: codeceptjs.beforeSuite for "test 1 @t1":
    ETXTBSY: text file is busy, open '/mnt/c/projects/codeceptjs-demo/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64-chromedriver'

FAIL | 0 passed, 1 failed, 1 skipped // 1s
› Stopped SeleniumStandaloneLauncher

# paste output here

I'm running command `npx codeceptjs run --verbose` under project root path level.

Provide test source code if related

// paste test
Details
  • CodeceptJS version:
  • NodeJS Version:
  • Operating System:
  • puppeteer || webdriverio || protractor || testcafe version (if related)
  • Configuration file:
# paste config here

const { setHeadlessWhen } = require('@codeceptjs/configure');

// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);

exports.config = {
  tests: './*_test.js',
  output: './output',
  helpers: {
    WebDriver: {
      url: 'localhost',
      browser: 'chrome',
      restart: false,
      windowSize: '1920x1680',
      desiredCapabilities: {
        chromeOptions: {
          args: [
          "--headless",
          "--disable-gpu",
          "--no-sandbox"
          ]
        }
      }
    }
  },
  include: {
    I: './steps_file.js'
  },
  bootstrap: null,
  mocha: {},
  name: 'codeceptjs-demo',
  plugins: {
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true
    },
    tryTo: {
      enabled: true
    },
    screenshotOnFail: {
      enabled: true
    },
    wdio: {
      enabled: true,
      services: ['selenium-standalone']
    }
  }
}

Thank you

Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
756
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeceptjs/CodeceptJS

Tất cả issue của codeceptjs/CodeceptJS

Issue tương tự

Thêm issue về JavaScript

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.