Coder Social home page Coder Social logo

sh0vel / conductor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from conductor-framework/conductor

0.0 1.0 0.0 12.13 MB

The Selenium framework that takes you where you want to go

Home Page: http://conductor.ddavison.io

License: Apache License 2.0

Java 100.00%

conductor's Introduction

Conductor

See the site

star fork

Getting Started

Using maven, include it as a dependency:

<dependency>
  <groupId>io.ddavison</groupId>
  <artifactId>conductor</artifactId>
  <version>2.2.2</version>
</dependency>

Create a Java Class, and extend it from io.ddavison.conductor.Locomotive

Drivers

Drivers should be put in the root of your project, and be named like this:

Mac

chromedriver.mac

Windows

chromedriver.exe

Linux

chromedriver.linux

So as an example, your project structure could be:

Project
| src
|   main
|     java
|       TestClass.java
| pom.xml
| chromedriver.mac
| chromedriver.exe
| chromedriver.linux

Currently, six browsers are supported and they are Firefox, HTMLUnit, Chrome, Internet Explorer, Safari, and PhantomJS

Goals

The primary goals of this project are to...

  • Take advantage of method chaining, to create a fluent interface.
  • Abstract the programmer from bloated scripts resulting from using too many css selectors, and too much code.
  • Provide a quick and easy framework in Selenium 2 using Java, to get started writing scripts.
  • Provide a free to use framework for any starting enterprise, or individual programmer.
  • Utilize the power of CSS!

Actions

You can perform any action that you could possibly do, using the inline actions.

  • click(By)
  • setText(By, text)
  • getText(By)
  • hoverOver(By)
  • check(By)
  • uncheck(By)
  • navigateTo(url)
  • goBack()
  • isPresent(By)
  • getAttribute(By, attribute)
  • etc.

In-line validations

This is one of the most important features that I want to accentuate.

  • validateText
  • validateTextNot
  • validateChecked
  • validateUnchecked
  • validatePresent
  • validateNotPresent
  • validateTextPresent
  • validateTextNotPresent

All of these methods are able to be called in-line, and fluently without ever having to break your tests.

Switching Windows

Another nice feature that is offered, is the simplicity of window switching in Selenium.

  • switchToWindow(regex)
  • waitForWindow(regex)
  • closeWindow(regex)

All of these functions take a regular expression argument, and match either the url or title of the window that you want to interact with.

Switching Frames

  • switchToFrame(idOrName)
  • switchToDefaultContent()

Implicit Waiting

In addition to the Selenium 2 implicit waiting, the AutomationTest class extends on this concept by implenting a sort of waitFor functionality which ensures that an object appears before interacting with it. This rids of most ElementNotFound exceptions that Selenium will cough up.

See a working example of what a test script written using this framework might look like.

Pull requests

If you have an idea for the framework, fork it and submit a pull-request!

conductor's People

Contributors

ddavison avatar supernevi avatar

Watchers

Shovon Hossain 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.