Framework to automate tests using Selenium WebDriver (lighten version without selenium drivers)
$ dotnet add package OcarambaLiteCross-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/OcarambaAI generated documentation DeepWiki<br /><br />
<img align="left" src="https://github.com/Accenture/Ocaramba/wiki/images/ocarambadiagram.png">It provides the following features:
"//*[@title='{0}' and @ms.title='{1}']", more details hereFor all documentation, visit the Ocaramba Wiki.
Projects examples of using Test 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);
}
}
}
Checkout the code or get it from nuget.org