最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - TypeError: this[#browser].sessionSubscribe is not a function - Stack Overflow

programmeradmin0浏览0评论

I'm using webDriver.io with cucumber to automate mobile apps

this is my package.json file

{
  "name": "webdriverio-appium-cucumber-boilerplate",
  "license": "MIT",
  "scripts": {
    "code:check": "yarn code:lint && yarn code:prettier",
    "code:format": "yarn code:lint --fix --quiet && yarn code:prettier --write",
    "code:lint": "eslint .",
    "code:prettier": "prettier --check \"**/*.js*\"",
    "report:allure": "npx allure",
    "report:generate": "yarn report:allure generate --clean ./test-report/allure-result/ -o ./test-report/allure-report",
    "report:open": "yarn report:allure open test-report/allure-report",
    "android.app": "npx wdio ./config/wdio.android.app.conf.js",
    "ios.app": "npx wdio ./config/wdio.ios.app.conf.js",
    "bs.app": "npx wdio ./config/wdio.bs.app.conf.js --debug",
    "android.sauce.rdc.app": "npx wdio ./config/saucelabs/wdio.android.rdc.app.conf.js",
    "ios.sauce.rdc.app": "npx wdio ./config/saucelabs/wdio.ios.rdc.app.conf.js"
  },
  "repository": {
    "type": "git",
    "url": ".git"
  },
  "dependencies": {
    "@babel/cli": "^7.7.0",
    "@babel/core": "^7.7.2",
    "@babel/node": "^7.7.0",
    "@babel/polyfill": "^7.7.0",
    "@babel/preset-env": "^7.7.1",
    "@babel/register": "^7.7.0",
    "@types/node": "^12.12.7",
    "@wdio/allure-reporter": "^9.6.3",
    "@wdio/globals": "^9.7.3",
    "@wdio/local-runner": "^9.7.3",
    "@wdio/spec-reporter": "^9.6.3",
    "allure-commandline": "^2.13.0",
    "archiver": "^7.0.1",
    "axios": "^1.7.9",
    "chokidar": "^4.0.3",
    "debug": "^4.1.1",
    "eslint": "^6.6.0",
    "eslint-config-airbnb": "^18.0.1",
    "eslint-config-airbnb-base": "^14.0.0",
    "eslint-config-prettier": "^6.5.0",
    "eslint-plugin-import": "^2.18.2",
    "husky": "^3.0.9",
    "nconf": "^0.12.1",
    "nodemailer": "^6.9.16",
    "prettier": "^1.19.1",
    "webdriverio": "^9.7.3"
  },
  "devDependencies": {
    "@cucumber/cucumber": "^11.2.0",
    "@wdio/browserstack-service": "^9.7.3",
    "@wdio/cli": "^9.7.3",
    "@wdio/cucumber-framework": "^9.7.3",
    "appium": "^2.15.0",
    "chai": "^5.1.2"
  },"overrides": {
    "@cucumber/cucumber": "^11.2.0"
  }
}

dont know where im going wrong , but im constantly getting this error :

TypeError: this[#browser].sessionSubscribe is not a function

I tried updating all the dependencies to a compatible level but that didn't worked out .

I'm using webDriver.io with cucumber to automate mobile apps

this is my package.json file

{
  "name": "webdriverio-appium-cucumber-boilerplate",
  "license": "MIT",
  "scripts": {
    "code:check": "yarn code:lint && yarn code:prettier",
    "code:format": "yarn code:lint --fix --quiet && yarn code:prettier --write",
    "code:lint": "eslint .",
    "code:prettier": "prettier --check \"**/*.js*\"",
    "report:allure": "npx allure",
    "report:generate": "yarn report:allure generate --clean ./test-report/allure-result/ -o ./test-report/allure-report",
    "report:open": "yarn report:allure open test-report/allure-report",
    "android.app": "npx wdio ./config/wdio.android.app.conf.js",
    "ios.app": "npx wdio ./config/wdio.ios.app.conf.js",
    "bs.app": "npx wdio ./config/wdio.bs.app.conf.js --debug",
    "android.sauce.rdc.app": "npx wdio ./config/saucelabs/wdio.android.rdc.app.conf.js",
    "ios.sauce.rdc.app": "npx wdio ./config/saucelabs/wdio.ios.rdc.app.conf.js"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/Schveitzer/webdriverio-appium-cucumber-boilerplate.git"
  },
  "dependencies": {
    "@babel/cli": "^7.7.0",
    "@babel/core": "^7.7.2",
    "@babel/node": "^7.7.0",
    "@babel/polyfill": "^7.7.0",
    "@babel/preset-env": "^7.7.1",
    "@babel/register": "^7.7.0",
    "@types/node": "^12.12.7",
    "@wdio/allure-reporter": "^9.6.3",
    "@wdio/globals": "^9.7.3",
    "@wdio/local-runner": "^9.7.3",
    "@wdio/spec-reporter": "^9.6.3",
    "allure-commandline": "^2.13.0",
    "archiver": "^7.0.1",
    "axios": "^1.7.9",
    "chokidar": "^4.0.3",
    "debug": "^4.1.1",
    "eslint": "^6.6.0",
    "eslint-config-airbnb": "^18.0.1",
    "eslint-config-airbnb-base": "^14.0.0",
    "eslint-config-prettier": "^6.5.0",
    "eslint-plugin-import": "^2.18.2",
    "husky": "^3.0.9",
    "nconf": "^0.12.1",
    "nodemailer": "^6.9.16",
    "prettier": "^1.19.1",
    "webdriverio": "^9.7.3"
  },
  "devDependencies": {
    "@cucumber/cucumber": "^11.2.0",
    "@wdio/browserstack-service": "^9.7.3",
    "@wdio/cli": "^9.7.3",
    "@wdio/cucumber-framework": "^9.7.3",
    "appium": "^2.15.0",
    "chai": "^5.1.2"
  },"overrides": {
    "@cucumber/cucumber": "^11.2.0"
  }
}

dont know where im going wrong , but im constantly getting this error :

TypeError: this[#browser].sessionSubscribe is not a function

I tried updating all the dependencies to a compatible level but that didn't worked out .

Share Improve this question asked Feb 6 at 2:55 Karthik PeddyKarthik Peddy 112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Fixed in 9.8.0

I faced the same issue with the @wdio/local-runner update. I tried downgrading it to 9.7.2, removing node_modules, package-lock.json, and npm install afterward.

Raised https://github.com/webdriverio/webdriverio/issues/14156

发布评论

评论列表(0)

  1. 暂无评论