Cannot run tests against BrowserStack with v5.0.0-beta01 - the remote session is not started.
Description
Cannot run tests against BrowserStack's App Automate platform with v5.0.0-beta01 - the remote session is not started.
I am not sure if this is something that BrowserStack will need to fix in their code or documentation, or if it's a bug that appium-dotnet-driver will need to address either in code, or documentation.
Using AddAdditionalAppiumOption sends uppercased appium:DeviceName and appium:Application (note: appium:Application is different to appium:app below) json properties to BrowserStack. This does not start a remote app session;
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalAppiumOption("DeviceName", "Samsung Galaxy S9");
capabilities.AddAdditionalAppiumOption("Application", "AppApk");
{
"appium:DeviceName": "Samsung Galaxy S9",
"appium:Application": "NetwealthAppApk"
}
Changing to use existing AppiumOptions properties sends lowercase appium:deviceName and appium:app json properties (note: appium:app is different to appium:Application above). This successfully creates a remote app session and the test runs fine;
AppiumOptions capabilities = new AppiumOptions();
capabilities.DeviceName = "Samsung Galaxy S9";
capabilities.App = "matthorrocks1/NetwealthAppApk";
{
"appium:deviceName": "Samsung Galaxy S9"
"appium:app": "matthorrocks1/NetwealthAppApk"
}
Hey @polyvisual - might not be related but I am wondering if you reached Browserstack endpoint, were you getting any errors when creating the AndroidDriver? I am getting this error {"Error : Platform and Browser not valid."} when passind the driverOptions to the AndroidDriver. Would you know how to bypass this?
Hey @polyvisual - might not be related but I am wondering if you reached Browserstack endpoint, were you getting any errors when creating the AndroidDriver? I am getting this error {"Error : Platform and Browser not valid."} when passind the driverOptions to the AndroidDriver. Would you know how to bypass this?
Hey, did you ever get any other response for this or find a different solution? I am getting the same error now after upgrading to the beta 5.0 version. The Json I'm creating ends up looking like this: { "browserName": "Chrome", "platformName": "Android", "appium:deviceName": "Samsung Galaxy S20", "appium:platformVersion": "10.0" }
But when I attempt to create the AndroidDriver I receive the same error message you mentioned, {"Error : Platform and Browser not valid."}
My assumption is the vendor name "appium" in front of the deviceName and platformVersion properties but based on the appium code I see no way of not sending them like that.
Hey @polyvisual - might not be related but I am wondering if you reached Browserstack endpoint, were you getting any errors when creating the AndroidDriver? I am getting this error {"Error : Platform and Browser not valid."} when passind the driverOptions to the AndroidDriver. Would you know how to bypass this?
Hey, did you ever get any other response for this or find a different solution? I am getting the same error now after upgrading to the beta 5.0 version. The Json I'm creating ends up looking like this: { "browserName": "Chrome", "platformName": "Android", "appium:deviceName": "Samsung Galaxy S20", "appium:platformVersion": "10.0" }
But when I attempt to create the AndroidDriver I receive the same error message you mentioned, {"Error : Platform and Browser not valid."}
My assumption is the vendor name "appium" in front of the deviceName and platformVersion properties but based on the appium code I see no way of not sending them like that.
Definitely not the vendor name in the properties. I was able to send them without that and I'm still getting the same error when trying to create the AndroidDriver. I've contacted BrowserStack to help investigate.
In case anyone ever sees this and needs additional information I was able to get this working with BrowserStack using the beta v5. BrowserStack also updated their documentation which helped. Instead of using AppiumOptions I now use ChromeOptions (or whatever browser is being used) to pass into the Android or iOS driver.
@bgoggan so it's not related to appium dotnet client?
Closed as 3rd party issue
Closed as 3rd party issue
Sorry, didn't see your post. I don't know if there is an issue with the dotnet client. I fixed my issue by no longer sending the appium options and instead using the associated browser options. Maybe the issue we had was specific to connecting to browser stack but maybe not.
If the author of this issue is still able to reproduce the above , we can consider re-opening this issue.