Ocaramba 4.2.1
dotnet add package Ocaramba --version 4.2.1
NuGet\Install-Package Ocaramba -Version 4.2.1
<PackageReference Include="Ocaramba" Version="4.2.1" />
paket add Ocaramba --version 4.2.1
#r "nuget: Ocaramba, 4.2.1"
// Install Ocaramba as a Cake Addin #addin nuget:?package=Ocaramba&version=4.2.1 // Install Ocaramba as a Cake Tool #tool nuget:?package=Ocaramba&version=4.2.1
Ocaramba
<img align="left" src="https://user-images.githubusercontent.com/12324498/73060034-43ff2580-3e97-11ea-9100-748d0716eba7.png">
Cross-Platform C# Framework to automate tests using Selenium WebDriver
Test Framework was designed in Objectivity to propose a common way how people should create Selenium WebDriver tests.
<img align="left" src="https://user-images.githubusercontent.com/12324498/73060119-73159700-3e97-11ea-99d3-1b21584c6baa.png"> Project API documentation can be found here: http://Accenture.github.io/Ocaramba<br /><br />
<img align="left" src="https://github.com/Accenture/Ocaramba/wiki/images/ocarambadiagram.png">
It provides the following features:
- .NET Frameworks 4.7.2 and .NET 8.0 supported
- Cross-Platform Windows, Linux and macOS systems supported
- Supports continuous integration tools like Azure DevOps, Teamcity, Jenkins and others.
- Ready for parallel tests execution, more details here
- Possibility to use MSTest, NUnit or xUNIT framework
- Specflow ready
- Written entirely in C#
- Contains example projects how to use it
- Allows using Chrome, Firefox, Edge Chromium, Safari or Internet Explorer
- Overrides browser profile preferences, pass arguments to browsers, installs browser extensions, loading default firefox profile, Headless mode, more details here
- Extends Webdriver by additional methods like JavaScriptClick, WaitForAjax, WaitForAngular, etc., more details here
- Automatically waits when locating element for specified time and conditions, GetElement method instead of Selenium FindElement, more details here
- Page Object Pattern
- Support for SeleniumGrid, Cross browser parallel test execution with SauceLab, TestingBot and Browserstack more details here, Advanced Browser Capabilities and Options more details here
- More common locators, e.g:
"//*[@title='{0}' and @ms.title='{1}']"
, more details here - Verify - asserts without stop tests, more details here
- Measures average and 90 Percentile action times, more details here
- DataDriven tests from Xml, Csv and Excel files for NUnit and Xml, Csv for MSTest with examples, more details NUnit, MsTest
- Possibility to take full desktop (only .NET Framework), save page source, more details here
- Visual Testing - browser screenshot of the element, more details here
- Logging with NLog, EventFiringWebDriver logs, more details here
- Files downloading (Firefox, Chrome), more details here
- Possibility to send SQL or MDX queries (only .NET Framework)
- Possibility of debugging framework installed from nuget package with sourcelink, more details here.
- AngularJS support, more details here.
- Possibility to check for JavaScript errors from the browser, more details here.
- Instruction on how to run Ocaramba tests with Docker container, more details here.
- ExtentReports support, more details here.
For all documentation, visit the Ocaramba Wiki.
Projects examples of using Test Framework :
- Ocaramba.Tests.Angular for AngularJS
- Ocaramba.Tests.Features for Specflow
- Ocaramba.Tests.MsTest for MsTest
- Ocaramba.Tests.NUnit for NUnit
- Ocaramba.Tests.NUnitExtentReports for NUnit featuring test execution HTML report based on ExtentReports framework
- Ocaramba.Tests.xUnit for xUnit
- Ocaramba.Tests.PageObjects for Page Object Pattern
- Ocaramba.Documentation.shfbproj for building API documentation
- Ocaramba.Tests.CloudProviderCrossBrowser for cross browser parallel test execution with BrowserStack\SauceLabs\TestingBot\SeleniumGrid
- Ocaramba.UnitTests for unit test of framework
NUnit Example Test:
namespace Ocaramba.Tests.NUnit.Tests
{
using global::NUnit.Framework;
using Ocaramba.Tests.PageObjects.PageObjects.TheInternet;
[Parallelizable(ParallelScope.Fixtures)]
public class JavaScriptAlertsTestsNUnit : ProjectTestBase
{
[Test]
public void ClickJsAlertTest()
{
var internetPage = new InternetPage(this.DriverContext).OpenHomePage();
var jsAlertsPage = internetPage.GoToJavaScriptAlerts();
jsAlertsPage.OpenJsAlert();
jsAlertsPage.AcceptAlert();
Assert.AreEqual("You successfuly clicked an alert", jsAlertsPage.ResultText);
}
}
}
NUnit Example Page Object:
namespace Ocaramba.Tests.PageObjects.PageObjects.TheInternet
{
using System;
using System.Globalization;
using NLog;
using Ocaramba;
using Ocaramba.Extensions;
using Ocaramba.Types;
using Ocaramba.Tests.PageObjects;
public class InternetPage : ProjectPageBase
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
/// <summary>
/// Locators for elements
/// </summary>
private readonly ElementLocator
linkLocator = new ElementLocator(Locator.CssSelector, "a[href='/{0}']");
public InternetPage(DriverContext driverContext) : base(driverContext)
{
}
public JavaScriptAlertsPage GoToJavaScriptAlerts()
{
this.Driver.GetElement(this.linkLocator.Format("javascript_alerts")).Click();
return new JavaScriptAlertsPage(this.DriverContext);
}
}
}
Where to start?
- See Getting started.
Checkout the code or get it from nuget.org
- Ocaramba
- OcarambaLite - lighten version without selenium drivers
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.AnalysisServices.AdomdClient.retail.amd64 (>= 19.84.1)
- NLog (>= 5.3.4)
- OcarambaLite (>= 4.2.1)
- Selenium.Support (>= 4.28.0)
- Selenium.WebDriver (>= 4.28.0)
- Selenium.WebDriver.ChromeDriver (>= 132.0.6834.8300)
- Selenium.WebDriver.GeckoDriver (>= 0.35.0)
- System.Configuration.ConfigurationManager (>= 9.0.1)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.0)
- System.Text.Json (>= 9.0.1)
-
net8.0
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Microsoft.Extensions.Configuration.Json (>= 9.0.1)
- Microsoft.PowerShell.Commands.Diagnostics (>= 7.4.6)
- Microsoft.PowerShell.SDK (>= 7.4.6)
- Microsoft.WSMan.Management (>= 7.4.6)
- NLog (>= 5.3.4)
- NLog.Web.AspNetCore (>= 5.3.15)
- OcarambaLite (>= 4.2.1)
- Selenium.Support (>= 4.28.0)
- Selenium.WebDriver (>= 4.28.0)
- Selenium.WebDriver.ChromeDriver (>= 132.0.6834.8300)
- Selenium.WebDriver.GeckoDriver (>= 0.35.0)
- System.Configuration.ConfigurationManager (>= 9.0.1)
- System.Data.Common (>= 4.3.0)
- System.Data.SqlClient (>= 4.9.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.0)
- System.Text.Json (>= 9.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.2.1 | 0 | 1/22/2025 |
4.2.0 | 517 | 11/21/2024 |
4.1.1 | 7,974 | 2/9/2023 |
4.1.0 | 383 | 2/1/2023 |
4.0.2 | 727 | 8/23/2022 |
4.0.1 | 995 | 6/3/2022 |
4.0.0 | 987 | 1/3/2022 |
3.3.1 | 2,295 | 7/21/2021 |
3.3.0 | 484 | 6/25/2021 |
3.2.12 | 9,638 | 3/8/2021 |
3.2.11 | 7,838 | 11/12/2020 |
3.2.10 | 11,340 | 4/16/2020 |
3.2.9 | 907 | 4/15/2020 |
3.2.8 | 8,110 | 3/6/2020 |
3.2.7 | 2,981 | 2/10/2020 |
3.2.6 | 786 | 1/7/2020 |
3.2.5 | 3,879 | 10/11/2019 |
3.2.4-beta | 2,552 | 10/4/2019 |
3.2.3-beta | 443 | 9/17/2019 |
3.2.2-alpha | 457 | 9/10/2019 |
3.2.1-alpha | 483 | 8/14/2019 |
3.2.0-alpha | 485 | 7/16/2019 |
3.1.17 | 12,490 | 9/17/2019 |
3.1.16 | 1,439 | 8/20/2019 |
3.1.15 | 6,758 | 6/12/2019 |
You can find info about this release here: https://github.com/ObjectivityLtd/Ocaramba/releases