-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
[🐛 Bug]: Android application test starts chrome instead of application #17274
Description
Description
Hello
I've updated to Selenium grid 4.41 and now, when I create a session with such capabilities
{"appium:app": "http://127.0.0.1:44454/de.moekadu.metronome_52.apk",
"appium:appActivity": "de.moekadu.metronome.MainActivity",
"appium:automationName": "UIAutomator2",
"appium:deviceName": "sdk_gphone64_x86_64",
"appium:fullReset": true,
"appium:newCommandTimeout": 120,
"appium:platformVersion": 14,
"appium:udid": "emulator-5554",
"goog:chromeOptions": {},
"platformName": "ANDROID"}It starts chrome on my Android emulator
And in fact, appium receives
{
"alwaysMatch": {
"browserName": "chrome",
"goog:chromeOptions": {},
"platformName": "ANDROID",
"appium:app": "http://127.0.0.1:44454/de.moekadu.metronome_52.apk",
"appium:appActivity": "de.moekadu.metronome.MainActivity",
"appium:automationName": "UIAutomator2",
"appium:deviceName": "sdk_gphone64_x86_64",
"appium:fullReset": true,
"appium:newCommandTimeout": 120,
"appium:platformVersion": "14",
"appium:udid": "emulator-5554"
},
"firstMatch": [
{}
]
}Here is the stereotype of the Android emulator slot
{
"id": {
"hostId": "8d0aa570-2cea-4294-bc9e-d8ede9efd727",
"id": "db7c401f-f853-47b9-a409-ecde457839d8"
},
"lastStarted": "1970-01-01T00:00:00Z",
"session": null,
"stereotype": {
"appium:deviceName": "sdk_gphone64_x86_64",
"appium:platformVersion": "14",
"browserName": "chrome",
"platformName": "ANDROID",
}
},For information, my stereotype specifies "chrome" as possible browser for the mobile slot, because on this android emulator, we may start either browser or application tests
The fact is that PR #15537 and #17097 put capability filtering in a method which looks if provided capabilities / stereotype contains some appium application related capabilities (e.g: "appium.app") to check if capabilities should be filtered.
But in case of stereotype, these keys have little chance to be provided, as, from my comprehension, they are test related
So this line
| capabilities = capabilities.merge(filterRelayCapabilities(stereotype)); |
Reproducible Code
May be provided later, but I think all information are present in the descriptionDebugging Logs
No logs to provide
ℹ️ Last known working version: 4.38