Coder Social home page Coder Social logo

test.automation's Introduction

Test.Automation

C# Framework to automate tests using Selenium WebDriver

Test Framework was designed in Objectivity to propose common way how people should create Selenium WebDriver tests.

Project API documentation can be found here: http://objectivityltd.github.io/Test.Automation

It provides following features:

  • 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 to use Chrome, Firefox, Safari or Internet Explorer
  • Overrides browser profile preferences, installs browser extensions, 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, more details here
  • Page Object Pattern
  • Support for SeleniumGrid, SauceLab and Browserstack more details here, Advanced-Browser-Capabilities more details here
  • More common locators, e.g: "//*[@title='{0}' and @ms.title='{1}']", more details here
  • Several methods to interact with kendo controls, 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 files for NUnit and MSTest with examples, more details here
  • Possibility to take full desktop or browser screen shot, save page source, 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
  • Possibility of debugging framework installed from nuget package, more details here.

For all documentation, visit the Test.Automation Wiki.

Projects examples of using Test Framework :

  • Objectivity.Test.Automation.Tests.Features for Specflow
  • Objectivity.Test.Automation.Tests.MsTest for MsTest
  • Objectivity.Test.Automation.Tests.NUnit for NUnit
  • Objectivity.Test.Automation.Tests.xUnit for xUnit
  • Objectivity.Test.Automation.Tests.PageObjects for Page Object Pattern
  • Objectivity.Test.Automation.Common.Documentation.shfbproj for building API documentation

NUnit Example Test:

namespace Objectivity.Test.Automation.Tests.NUnit.Tests
{
    using global::NUnit.Framework;

    using Objectivity.Test.Automation.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 Objectivity.Test.Automation.Tests.PageObjects.PageObjects.TheInternet
{
    using System;
    using System.Globalization;

    using NLog;

    using Objectivity.Test.Automation.Common;
    using Objectivity.Test.Automation.Common.Extensions;
    using Objectivity.Test.Automation.Common.Types;
    using Objectivity.Test.Automation.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?


Checkout the code or get it from nuget.org

  • Objectivity.Test.Automation.Common.NUnit nuget
  • Objectivity.Test.Automation.Common.Features nuget
  • Objectivity.Test.Automation.Common.MsTest nuget
  • Objectivity.Test.Automation.Common.xUnit nuget

test.automation's People

Contributors

raczeja avatar kf-tomaszbien avatar pawelstryczek avatar tfajks avatar kf-slawomirpacia avatar tbien avatar martanowik avatar kreeke avatar urbanmichal avatar kf-patrykkulecki avatar

Watchers

James Cloos avatar Jude avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.