-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standalone server and point to a wrong path. Please set path: '/wd/hub'
in your wdio.conf.js
#5557
Comments
Hey, |
@christian-bromann It seems since this commit c5a0167, every capabilities will be overridden with
@amrkamel1 Can you try specifying {
"platformName": "iOS",
"platformVersion": "11.0",
"deviceName": "iPhone 7",
"automationName": "XCUITest",
"app": "/path/to/my.app"
+ "path": "/"
} I don't know what is the use case of using these 2 services together, but maybe the above approach will work. |
im not quite sure if i understand u, this path should be path to what
|
@hieuxlu yes. Users still can set the path properly in the config to run both services together. Unfortunately the selenium-standalone server requires the path to be on |
@amrkamel1 That should be that path to Appium server, I think by default it should be For this reason, you should either set exports.config = {
+ path: '/wd/hub',
specs: ['./test/specs/*.spec.js'], https://github.com/Amrkamel1/wdExample/blob/master/wdio.conf.js |
no luck, still unable execute the test, im getting the erro below |
This is different, I can see that Appium server did start successfully, so original error should be resolved. The above error should be related to loglevel, you might want setting loglevel explicitly |
@amrkamel1 maybe try to reinstall the dependencies, that looks like an odd error. |
i have already deleted the entire node_modules and reinstall everything, still getting errors as shown below
|
@amrkamel1 this is a different error now, see error message:
Please check why the error is being thrown there. |
okay i solved this toLowerCase issue , after that i have tried the approach provided above and still getting the very first error, check below my wdio config
|
@amrkamel1 please the comment from above:
|
i have already try all this different combination, putting "path: '/wd/hub' in wido config didnt work the i comment that line and i added path in each caps doesn't work , then i added path: '/wd/hub' in wdio config and inside caps as well didnt work then i used path: '/' in wdio config and removed path from caps, didnt work then i added i added one path: '/' and other "path: '/wd/hub' and vice also didnt work i was getting same error for all of these tries |
Sorry, from your code snippets it seemed that you commented that out which is why I was pointed it out. Can you try: exports.config = {
specs: ['./test/specs/*.spec.js'],
capabilities: {
myChromeBrowser: {
port: 4444,
path: '/wd/hub'
capabilities: {
browserName: 'chrome',
path: '/wd/hub'
}
},
androidClient: {
port: 4728,
path: '/wd/hub'
capabilities: {
path: '/wd/hub'
platformName: 'Android',
browserName: 'chrome',
'appium:deviceName': 'pixel2',
'appium:avd': 'pixel2',
'appium:platformVersion': '10',
'appium:avdLaunchTimeout': 120000,
'appium:avdReadyTimeout': 120000,
'appium:uiautomator2ServerInstallTimeout' :120000,
'appium:appWaitForLaunch': true,
'appium:ensureWebviewsHavePages': true,
'appium:disableWindowAnimation': true,
'appium:autoGrantPermissions': true,
'appium:clearSystemFiles': true,
'appium:nativeWebScreenshot': true
}
}
},
// ...
} |
@christian-bromann same error
|
sorry, updated:
|
same :(
|
@christian-bromann |
Guys this ticket has been closed, however all provided solutions above gave same error |
@amrkamel1 any help on this would be appreciated! |
@amrkamel1 I think you should not mix 2 services in the same
What we normally do is either of below approaches:
|
Can you elaborate more how i can dynamically switch between service in same spec file Since i have spend alot of time didnt find proper info for this case Lets say have to conf.js file one for appium to launch mobile app and another conf.js for selenium service So how i can make simple test case that have two method first one will click on an element in browser and 2nd method will click on an elememt on mobile app within same it block |
That feels wrong, I'm pretty sure wdio and Selenium/Appium would not support such use case. There's a reason we run test for each I think what you're trying to do is to create a side effect on the browser that is necessary for the subsequent action on the mobile app. In such case, we should just provision the side effect in I haven't seen the use case you mentioned so correct me if I'm wrong, and please detail why you need to mix browser and app inside a single test case? |
Definetly thats make sense But for example when u are usinh java with TestNg you can manipulate the caps and terminate the driver and inititate another one in the testng hooks this leverage ur testing effort For example u do some action on mobile app and you want to confirm that changes reflect on the web app, im able to manage this using testng framework with java But since i recently start to use wdio so im try to demonstare all features and tricks that i was able to perform it using testng Also i have one use case that was using in my current project that i should open chrome browser in mobile device and navigate to playstore web app then search by app package for specific app then download it After that inititate the downloaded app by terminating the first session and initiate the 2nd one with the app capabilities. My point is this kind of felixibility give good credit for the tool since there are actual cases that u need to use web app and mobile app as well |
I think you're mixing browser automation which can be easily done by puppeteer, and wdio, which is a full fledged JavaScript e2e test framework. We don't use test framework for automation tasks. So do you agree that we should close this issue because it's not smth wdio support and not a bug of wdio? |
To be more precise im mixing desktop browser with mobile or chrome browser in mobile app with mobile app If this feature is not supported and no plan to be supported in future, then i think you should close it |
I'm sure that |
maybe its not bug but its a drawback since, it doesn't support cross service testing specially with mobile app since most of mobile app are linked to web app and cross verification is required this can be done by selenium and java client with testng framework but seems not supported by wdio maybe it would be nice if there is way to override the caps in wdio config but automatically terminate the driver and initiate new one with the desired caps within the spec file |
I think it is a bug. WebdriverIO should allow you to run browser tests and mobile tests in one suite at the same time. Let's say you want to run web tests on desktop and mobile, you would need Appium and Selenium Standalone to have the right drivers setup. |
I tried with following setup: capabilities: [{
port: 4446,
browserName: 'chrome',
acceptInsecureCerts: true
}, {
port: 4445,
browserName: 'firefox',
acceptInsecureCerts: true
}],
services: [
['chromedriver', {
port: 4446
}],
['selenium-standalone', {
args: {
seleniumArgs: ['-port', '4445']
},
}]
], and saw both browser starting with the right drivers:
|
so I checked with capabilities: {
myChromeBrowser: {
port: 4446,
path: '/',
capabilities: {
browserName: 'chrome',
acceptInsecureCerts: true
}
},
myFFBrowser: {
port: 4445,
capabilities: {
browserName: 'firefox',
acceptInsecureCerts: true
}
}
},
services: [
['chromedriver', {
port: 4446
}],
['selenium-standalone', {
args: {
seleniumArgs: ['-port', '4445']
},
}]
], @amrkamel1 my hunch is that we don't properly update the multiremote capabilities in the Appium service. Could you help and tweak that area in the node_modules to see which change needs to be applied? |
@christian-bromann |
The test show a correct behavior. |
That sounds great, i will try this caps that you have posted and let you know once i return back from vacation (next week) since i dont have access for any laptop now |
Enjoy your vacation! |
i have tried the following, and still didnt manage to get it work
|
Good news!! :D
note: |
Yeah, this is a different story. Glad it works now. |
Environment (please complete the following information):
"@wdio/allure-reporter": "^6.1.14", "@wdio/appium-service": "^6.1.16", "@wdio/dot-reporter": "^6.1.14", "@wdio/local-runner": "^6.1.20", "@wdio/mocha-framework": "^6.1.19", "@wdio/selenium-standalone-service": "^6.1.14", "@wdio/spec-reporter": "^6.1.14", "@wdio/sync": "^6.1.14", "chai": "^4.2.0", "chromedriver": "^83.0.0", "wdio-chromedriver-service": "^6.0.3"
Config of WebdriverIO
you can find it in the url provided below
Describe the bug
Unable to trigger certain capabilities when using multi-remote feature as it seems ports are overlapping each other and throws an error as shown in the screenshot attached below
To Reproduce
https://github.com/Amrkamel1/wdExample/tree/master
Expected behavior
I should be able to run certain capabilities separately
Log
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: