Skip to content

Ocaramba framework with Appium

Jakub Raczek edited this page Jul 1, 2025 · 1 revision

Configuration Setup

To use Ocaramba with Appium, you need to configure your test project to use the Appium browser type. The framework supports Appium through a dedicated browser type enum BrowserType:

Appium

Test Project Structure

Ocaramba includes a dedicated Appium test project that demonstrates the integration Ocaramba.Tests.Appium.csproj. This project includes the necessary Appium.WebDriver dependencies and shows the proper project setup.

Driver Initialization

The framework provides built-in Appium support through the DriverContext class, which contains an Appium-specific startup method DriverContext.cs. This method handles the configuration and initialization of Appium drivers for mobile testing.

Configuration Properties

Appium-specific configuration properties are defined in the BaseConfiguration class BaseConfiguration.cs , which reads settings from your appsettings.json file.

"AppiumPlatformName": "Android",
"AppiumDeviceName": "emulator-5554",
"AppiumAppPath": "/home/runner/work/Ocaramba/Ocaramba/Ocaramba.Tests.Appium/bin/Release/net8.0/ApiDemos-debug.apk",
"AppiumAppPackage": "io.appium.android.apis",
"AppiumAppActivity": "io.appium.android.apis.ApiDemos",
"AppiumServerUrl": "http://127.0.0.1:4723/",
"AppiumAutomationName": "UiAutomator2"

Test Base Class

The framework includes a ProjectTestBase class that shows how to properly initialize the driver context for Appium tests ProjectTestBase.cs .

Configuration Files

Example configuration files are provided showing the structure needed for Appium settings appsettings.json and appsettings.Linux.json .

Notes

The Ocaramba framework provides comprehensive Appium integration that supports both Android and iOS platforms. The implementation uses modern AppiumOptions instead of deprecated DesiredCapabilities, and the configuration is driven through JSON settings files. The framework includes proper dependency management with Appium.WebDriver version 8.0.0 across all mobile testing projects.

For detailed implementation examples and specific configuration options, refer to the Ocaramba.Tests.Appium project within the repository, which serves as a complete working example of Appium integration.

Clone this wiki locally