Images with .NET Core and Chrome browser to run Ocaramba framework tests
7.4K
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.
Project API documentation can be found here: http://objectivityltd.github.io/Ocaramba
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
Content type
Image
Digest
sha256:0f63bd2f4…
Size
1011.3 MB
Last updated
9 months ago
docker pull ocaramba/selenium