3

Error message displayed : `ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

ERROR webdriver: unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

` wdio.conf.js file:

**let { join } = require('path'); exports.config = { port: 4723, // default appium port services: [ ['appium', { command : 'appium' }] ],

specs: [
    './test/specs/**/*.js'
],

maxInstances: 10,
capabilities: [{
    platformName:'Android',
    platformVersion:'9',
    deviceName:'Pixel',
    app:'D:/test/appium/test2/ApiDemos-debug.apk',   

bail: 0,   
baseUrl: 'http://localhost',    
waitforTimeout: 60000,    
connectionRetryTimeout: 120000,   
connectionRetryCount: 3, 

framework: 'mocha',

}**

package.json file: ** {

"name": "test2",

"version": "1.0.0",

"description": "",

"main": "index.js",

"scripts": {

"test": "./node_modules/.bin/wdio wdio.conf.js"

},

"keywords": [],

"author": "",

"license": "ISC",

"dependencies": {

"@wdio/cli": "^7.3.1",

"appium": "^1.20.2"

},

"devDependencies": {

"@wdio/appium-service": "^7.4.2",

"@wdio/local-runner": "^7.3.1",

"@wdio/mocha-framework": "^7.3.1",

"@wdio/selenium-standalone-service": "^7.3.1",

"@wdio/spec-reporter": "^7.3.1",

"@wdio/sync": "^7.3.1",

"chromedriver": "^89.0.0",

"wdio-chromedriver-service": "^7.0.0"

}

}**

test mango
  • 31
  • 1
  • 1
  • 3

3 Answers3

6

Add path: '/wd/hub/' in config file.

5

Run this in the commandline to start the appium

appium --base-path /wd/hub

And make sure that the "Remote Path" in your Appium inspector is

/wd/hub
flame3
  • 2,812
  • 1
  • 24
  • 32
0

I just tried. it works. you need add /wd/hub on your base URL baseUrl: 'http://localhost/wd/hub'

also, you need to start appium server with the command below

appium --base-path /wd/hub