Description
I have an issue I've been struggling to resolve. I want to run my Appium tests locally, but I am getting this error:
[Android.Tests.LoginTest.Login_WithEmail]
Failed
OpenQA.Selenium.WebDriverException : The 'value > error' property was not found in the response:
{"value":{"message":"Session not started or terminated"},"sessionId":"","status":13}
at Android.Tests.LoginTest.Login_WithEmail_Patch2(LoginTest this)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Failed Login_WithEmail [13 s]
Stack Trace:
at Android.Tests.LoginTest.Login_WithEmail_Patch2(LoginTest this)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: 13 s - Android.dll (net8.0)
Some notes:
- Using C#, Appium and NUnit for tests
- These tests are being run locally on emulators/simulators
- Same issue happens on Android and iOS
- App is being started in the emulator but I am getting the error from above the moment code should start interacting with UI elements
- After some debugging the issue is most likely somewhere in my AppiumDriverFactory.cs which is responsible for passing capabilities and creating a driver
- I am not using the latest Appium WebDriver version, which is 8.0.0. I am currently using 6.0.0 (tried upgrading to 7.2.0 and 8.0.0 - error is the same)
- I am using BrowserStack to run tests in the cloud, but that is only in the Azure pipeline. We develop tests locally
- To run tests locally I need to have a x64 wrapper for Mac M1 machines. Explanation can be found here: https://www.browserstack.com/docs/app-automate/appium/getting-started/c-sharp#CLI
- To run test or tests I use this command: dotnet64 test --filter FullyQualifiedName=Android.Tests.LoginTest.Login_WithEmail - this one is for a single test only
What I've tried:
- Upgrading Appium server to the latest version
- Upgrading UIAutomator and XCUITest to their latest versions
- Upgrading AppiumWebDriver to it's latest version
- Tried isolated code approach where I put everything in one test class (so no inheritance)
- Tried creating a small ConsoleApp just to see if the communication with Appium server is working correctly - it does
- According to Appium logs, server is working correctly, and capabilities are also passed correctly. App is also started correctly and I can see it in the emulator
In the end no matter what I did, the error stayed the same. Has anyone had a similar issue?