# Ocaramba DriverContext Browser Options: Complete Guide to Supported Browsers and Configuration

> Explore Ocaramba DriverContext browser options. Discover support for Chrome, Firefox, Safari, Edge, IE, BrowserStack, and mobile via Appium. Get the complete guide to configuration.

- Repository: [Accenture/ocaramba](https://github.com/accenture/ocaramba)
- Tags: deep-dive
- Published: 2026-02-23

---

**Ocaramba's `DriverContext` supports 12+ browser types including Chrome, Firefox, Safari, Edge (legacy and Chromium), Internet Explorer, RemoteWebDriver, BrowserStack, and mobile platforms via Appium.**

The `DriverContext` class in the [accenture/ocaramba](https://github.com/accenture/ocaramba) repository serves as the core engine for browser instantiation in automated testing. Understanding which browser options are supported by Ocaramba's DriverContext is essential for configuring cross-browser test suites, remote grid execution, and mobile device testing through a unified API.

## Supported Browser Types in Ocaramba's DriverContext

The framework defines all supported drivers in the `BrowserType` enum located in [`OcarambaLite/BrowserType.cs`](https://github.com/accenture/ocaramba/blob/main/OcarambaLite/BrowserType.cs). The `DriverContext.Start()` method uses this enum to determine which browser instance to create.

The complete list of supported browser options includes:

- **Chrome** – Full support with `ChromeOptions` configuration
- **Firefox** – Full support with `FirefoxOptions` configuration  
- **InternetExplorer/IE** – Legacy IE support using `InternetExplorerOptions`
- **Safari** – macOS Safari automation via `SafariOptions`
- **Edge** – Legacy Microsoft Edge (EdgeHTML)
- **EdgeChromium** – Modern Chromium-based Edge
- **RemoteWebDriver** – Selenium Grid execution
- **BrowserStack** – Cloud testing via BrowserStack
- **Appium** – Mobile testing for Android and iOS
- **CloudProvider** – Generic cloud provider support
- **Android/Iphone** – Direct mobile device references

## How DriverContext Configures Browser Options

The architecture follows a factory pattern where `DriverContext.Start()` acts as the entry point. Located in [`OcarambaLite/DriverContext.cs`](https://github.com/accenture/ocaramba/blob/main/OcarambaLite/DriverContext.cs), this method contains a switch statement that maps each `BrowserType` to a specific initialization method.

The configuration flow works as follows:

1. **Configuration Reading** – `BaseConfiguration.TestBrowser` reads the browser type from [`appsettings.json`](https://github.com/accenture/ocaramba/blob/main/appsettings.json) or environment variables
2. **Method Selection** – The `Start()` switch invokes browser-specific methods like `StartChrome()`, `StartFirefox()`, or `SetupRemoteWebDriver()`
3. **Options Building** – Each method calls a private property getter (e.g., `ChromeOptions`, `FirefoxOptions`) that constructs the Selenium options object
4. **Capability Injection** – The options objects incorporate settings from configuration sections like `ChromePreferences`, `FirefoxExtensions`, and proxy settings

## Configuring Chrome Browser Options

Chrome support utilizes the `ChromeOptions` class. The `DriverContext.ChromeOptions` property (lines 40-44 in [`DriverContext.cs`](https://github.com/accenture/ocaramba/blob/main/DriverContext.cs)) builds the options instance by reading `ChromePreferences` from configuration.

```csharp
// appsettings.json configuration
{
  "ChromePreferences": {
    "download.default_directory": "C:\\Downloads",
    "profile.default_content_settings.popups": 0
  },
  "ChromeExtensions": [
    "path\\to\\extension.crx"
  ]
}

```

```csharp
using Ocaramba;

public class ChromeTest
{
    private readonly DriverContext driverContext = new DriverContext();

    public void RunChromeTest()
    {
        BaseConfiguration.TestBrowser = BrowserType.Chrome;
        
        driverContext.Start();
        driverContext.WindowMaximize();
        driverContext.Driver.Navigate().GoToUrl("https://example.com");
        
        // Test execution logic here
        
        driverContext.Stop();
    }
}

```

## Configuring Firefox and Internet Explorer Options

Firefox configuration follows a similar pattern using `FirefoxOptions`. The `DriverContext.FirefoxOptions` property (lines 18-22) handles extensions and preferences.

Internet Explorer support uses `InternetExplorerOptions` via the `InternetExplorerOptions` property (lines 46-50), which configures IE-specific capabilities like ignoring protected mode settings.

```csharp
// Firefox configuration example
BaseConfiguration.TestBrowser = BrowserType.Firefox;
BaseConfiguration.FirefoxExtensions = new[] { "path\\to\\extension.xpi" };

driverContext.Start(); // Creates FirefoxDriver with custom options

```

## Remote WebDriver and Cloud Provider Configuration

For Selenium Grid execution, `DriverContext` supports `RemoteWebDriver` through the `SetupRemoteWebDriver()` method (lines 215-218). This method constructs the appropriate options object based on the target browser, then creates a `RemoteWebDriver` instance pointing to the grid hub.

```csharp
// Remote WebDriver configuration
BaseConfiguration.TestBrowser = BrowserType.RemoteWebDriver;
BaseConfiguration.RemoteWebDriverHub = "http://selenium-grid-hub:4444/wd/hub";
BaseConfiguration.CrossBrowserEnvironment = "linux-chrome"; // Maps to specific capabilities

driverContext.Start(); // Creates RemoteWebDriver with ChromeOptions

```

BrowserStack cloud testing uses the `BrowserStack` enum value, which invokes `SetupBrowserStack()` (lines 266-270). This creates a Chrome-based remote driver configured for BrowserStack's infrastructure.

## Mobile Testing with Appium in DriverContext

Mobile automation is supported through the `Appium` browser type. The `StartAppium()` method (lines 244-260) builds an `AppiumOptions` object and instantiates either `AndroidDriver` or `IOSDriver` based on the platform configuration.

```csharp
// Appium mobile configuration
BaseConfiguration.TestBrowser = BrowserType.Appium;
BaseConfiguration.AppiumPlatformName = "Android";
BaseConfiguration.AppiumDeviceName = "Pixel_3a_API_30_x86";
BaseConfiguration.AppiumAppPath = "/path/to/app.apk";

driverContext.Start(); // Creates AndroidDriver with AppiumOptions

```

## Summary

- **Ocaramba's DriverContext** supports 12+ browser types defined in the `BrowserType` enum, including Chrome, Firefox, Safari, Edge (both legacy and Chromium), Internet Explorer, and mobile platforms.
- **Configuration-driven architecture** allows browser selection via `BaseConfiguration.TestBrowser` (set in [`appsettings.json`](https://github.com/accenture/ocaramba/blob/main/appsettings.json) or code), with specialized options classes (`ChromeOptions`, `FirefoxOptions`, etc.) built by private property getters in [`DriverContext.cs`](https://github.com/accenture/ocaramba/blob/main/DriverContext.cs).
- **Remote and cloud execution** is supported through `RemoteWebDriver`, `BrowserStack`, and `CloudProvider` types, with `SetupRemoteWebDriver()` handling grid capabilities and `SetupBrowserStack()` configuring cloud-specific Chrome instances.
- **Mobile automation** uses the `Appium` browser type, where `StartAppium()` constructs `AppiumOptions` and creates platform-specific drivers (`AndroidDriver` or `IOSDriver`) based on configuration settings.

## Frequently Asked Questions

### How do I configure Chrome-specific preferences in Ocaramba?

Chrome preferences are configured through the `ChromePreferences` section in [`appsettings.json`](https://github.com/accenture/ocaramba/blob/main/appsettings.json) or via the `ChromePreferences` configuration property. The `DriverContext.ChromeOptions` property reads these settings and applies them to the `ChromeOptions` instance before creating the `ChromeDriver`. For example, you can set download directories or disable popups by adding key-value pairs to the `ChromePreferences` configuration object.

### What is the difference between Edge and EdgeChromium in Ocaramba?

The `Edge` enum value targets the legacy Microsoft Edge browser (EdgeHTML engine), while `EdgeChromium` targets the modern Chromium-based Edge browser. Both use `EdgeOptions` classes, but the `EdgeChromium` configuration in `DriverContext.EdgeOptions` (lines 81-85) allows setting the `BinaryLocation` property specifically for the Chromium driver, whereas the legacy implementation uses the older Edge driver protocol.

### How does Ocaramba handle mobile testing with Appium?

Ocaramba handles mobile testing through the `Appium` browser type and the `StartAppium()` method in [`DriverContext.cs`](https://github.com/accenture/ocaramba/blob/main/DriverContext.cs) (lines 244-260). When `BaseConfiguration.TestBrowser` is set to `BrowserType.Appium`, the method builds an `AppiumOptions` object using platform-specific settings like `AppiumPlatformName`, `AppiumDeviceName`, and `AppiumAppPath`. It then instantiates either an `AndroidDriver` or `IOSDriver` based on whether the platform name is "Android" or "iOS", enabling native mobile automation through the same `DriverContext` API used for desktop browsers.