Closed samagarw closed 1 year ago
Attaching devices in device farm :
@samagarw Plugin would pick the first available device. What is your intention here?? Can you show your capabilities ?
@saikrishna321 : I want to run it on different devices based on udid . Why it is always picking the first device even if the udid doesn't match ? This is wrong implementation .
Based on capabilities it should pick the device .
I am passing udid as x and it it running on y because y is listed and is available first . Then what is the use of capabilities
Intention is to run on different devices based on udid or other capability . I want to test certain tests on 1 device and some on other .
Capabilities : {acceptSslCert: false, appium:automationName: UIAutomator2, appium:build: Smoke..., appium:build_id: Smoke..., appium:deviceAvailabilityTimeout: 1800, appium:deviceRetryInterval: 100, appium:name: Samsung Galaxy A21s - OSv10, appium:project_id: Samsung Galaxy A21s - OSv10, appium:udid: RZ8N92KNEGY, appium:uiautomator2ServerInstallTimeout: 50000, browserName: chrome, build_id: Smoke..., clearSystemFiles: true, dashboard:name: Samsung Galaxy..., deviceName: RZ8N92KNEGY, goog:chromeOptions: {args: [], extensions: []}, javascriptEnabled: true, name: Check, networkConnectionEnabled: true, newCommandTimeout: 9999, platform: ANDROID, platformName: Android, project: Check, project_id: Samsung Galaxy A21s - OSv10, udid: RZ8N92KNEGY, w3c: false, wdaStartupRetryInterval: 20000}
@samagarw Can you try adding the capability 'appium:udids': 'RZ8N92KNEGY',
Yes i don't know about this capability . Added and it worked . Can you also share the list of capabilities supported ? So that i can use them next time instead of raising any issues ?
Thank you for all the support though .
@samagarw Here is the doc - https://github.com/AppiumTestDistribution/appium-device-farm#capabilities
Added 5 android devices .
[debug] [ADB] Connected devices: [{"udid":"2a39334b40047ece","state":"device"},{"udid":"R5CT30YNCSN","state":"device"},{"udid":"R5CT3286HHV","state":"device"},{"udid":"RZ8N92KNEGY","state":"device"},{"udid":"hibejbv84hztdq6h","state":"device"}] [device-farm] Android Device details for 2a39334b40047ece already available [device-farm] Android Device details for R5CT30YNCSN already available [device-farm] Android Device details for R5CT3286HHV already available [device-farm] Android Device details for RZ8N92KNEGY already available [device-farm] Android Device details for hibejbv84hztdq6h already available
Creating a webdriver with following capabilities :
{acceptSslCert: false, appium:automationName: UIAutomator2, appium:build: Smoke..., appium:build_id: Smoke..., appium:deviceAvailabilityTimeout: 1800, appium:deviceRetryInterval: 100, appium:name: Samsung Galaxy A21s - OSv10, appium:project_id: Samsung Galaxy A21s - OSv10, appium:udid: RZ8N92KNEGY, appium:uiautomator2ServerInstallTimeout: 50000, browserName: chrome, build_id: Smoke..., clearSystemFiles: true, dashboard:name: Samsung Galaxy..., deviceName: RZ8N92KNEGY, goog:chromeOptions: {args: [], extensions: []}, javascriptEnabled: true, name: Check, networkConnectionEnabled: true, newCommandTimeout: 9999, platform: ANDROID, platformName: Android, project: Check, project_id: Samsung Galaxy A21s - OSv10, udid: RZ8N92KNEGY, w3c: false, wdaStartupRetryInterval: 20000}
But still the execution happens on : 2a39334b40047ece device udid .
This was working fine in selenium grid but in device farm it is always picking the same device .
Attaching snapshot while executing .
Is the first device getting locked always from the list . Do we need to pass any other capabilities .