Closed AlessandroMiccoli closed 12 months ago
Are you sure the code responsible for that is not in the selenium lib?
The Platform enum is in selenium. You are right. Appium inherits the issue. And systematically here I have the conversion from macOS to mac:
@Override
@Nullable
public Platform getPlatformName() {
return Optional.ofNullable(getCapability(CapabilityType.PLATFORM_NAME))
.map(cap -> {
if (cap instanceof Platform) {
return (Platform) cap;
}
try {
return Platform.fromString((String.valueOf(cap)));
} catch (WebDriverException e) {
return null;
}
})
.orElse(null);
}
Do I need to make the request in the Selenium GitHub? Or could we fix it in Appium?
We are patching many things in Appium although this particular change could be breaking. Is there a possibility for you to do the necessary patching in your code?
Yes, I could try to make the changes.
Probably, a solution could be to include or amend the macOS value in appium-chromium-driver?
"appium": {
"driverName": "chromium",
"automationName": "Chromium",
"platformNames": [
"Windows",
"macOS",
"Linux"
],
"mainClass": "ChromiumDriver"
},
yes, this might be possible. Maybe another simple PR from you? ;)
We would definitely merge a simple PR that added a compatible platformName to the chromium driver's manifest.
I created the pull request for fixing the issue: https://github.com/appium/appium-chromium-driver/pull/158
It should fix the issue.
I am curious to learn more about the current implementations of the libraries linked to appium if someone is interested in spending time with me. Let me know if you have a group; if it is open, I will be happy to participate.
We use Slack for internal dev-related communication. Feel free to join it.
This issue could be closed. I updated the driver to chromium@1.2.0
, and now it works.
Capabilities {appium:automationName: CHROMIUM, browserName: CHROME, platformName: MAC}
@mykola-mokhnach Thanks for merging my PR so quickly.
@mykola-mokhnach The slack link doesn't work. Could you give me directions for joining the group?
ERROR: I need to run an automation test on the Chrome browser, and I created a class that extends BaseOptions. When I set the platform name, I could use only macOS, Windows or Linux. When I use macOS, it is converted to mac.
This is the error:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'Chromium' and platformName '**mac**'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Driver 'chromium' supports automationName 'Chromium', but Appium could not find support for platformName 'mac'. Supported platformNames are: ["Windows","macOS","Linux"])
If I understood correctly, the reason lies in the Platform enum class: MAC("mac", "darwin", "macOS", "mac os x", "os x")
TEMPORARY SOLUTION: At the moment, I bypassed the issue, giving "Linux" values as the platform name.
REQUEST Is it possible to isolate the macOS value in the enum Platform? Or is there an alternative solution for using macOS?