Giter VIP home page Giter VIP logo

vaccinalbowl / selenium-page-object-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rickypc/selenium-page-object-generator

0.0 1.0 0.0 1.09 MB

A nimble and flexible Selenium Page Object Model generator to improve agile testing process velocity.

Home Page: https://chrome.google.com/webstore/detail/epgmnmcjdhapiojbohkkemlfkegmbebb

License: GNU Affero General Public License v3.0

JavaScript 86.18% HTML 6.90% CSS 6.80% Shell 0.12%

selenium-page-object-generator's Introduction

Install from Chrome Web Store Install from Opera Addons Catalog

Selenium Page Object Generator

A nimble and flexible Selenium Page Object Model generator to improve agile testing process velocity.

Selenium Page Object Generator is an essential tool to improve your workflow. It will generate Page Object Model on active Chrome or Opera tab with a single click, provided that all of the options and template are configured. The generated Page Object Model will be saved to pre-configured Chrome or Opera download folder.

Selenium Page Object Generator is also available in command line by installing Node.JS package from NPM Registry.

The template is using Handlebars.js expression, a clean logic-less semantic templating language.

This is an early BETA release, it expected to have rough edges, and limited functionality. It currently support 3 different targets: Java, C#, and Robot Framework.

For more information on how to use the generated Page Object file:

Java: https://code.google.com/p/selenium/wiki/PageFactory#The

C#: http://relevantcodes.com/pageobjects-and-pagefactory-design-patterns-in-selenium/#post-5229

Robot Framework: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#taking-resource-files-into-use

(You need to use Chrome 40+ or Opera 15+ or Node.JS 5.x to try this out)

Installation

  • To install the newest released version on Chrome browser, please download it from Chrome web store.
  • To install the newest released version on Opera browser, please download it from Opera addons catalog.
  • To install the newest released version on command line, please install Node.js and run command below:
$ npm install selenium-page-object-generator

Command Line Usage

Selenium Page Object Generator accepts the following command line arguments:

selenium-page-object-generator [options]

  -h, --help                                 Show this help message and exit.
  -v, --version                              Show program's version number and exit.
  -t, --target {cs,java,robot}               Generator target
  -n, --name [PageName]                      Page name (no-spaces)
  -d, --destination [DestinationPageName]    Destination page name (no-spaces) (optional)
  -s, --source [source.html]                 Source file

Examples

To generate Java page object:

$ node_modules/.bin/selenium-page-object-generator -t java -n MySite -s source.html

Development Dependencies

You will need to install Node.js as a local development dependency. The npm package manager comes bundled with all recent releases of Node.js.

npm install will attempt to resolve any npm module dependencies that have been declared in the project’s package.json file, installing them into the node_modules folder.

$ npm install

Development

To build the sources into corresponding packages, run:

$ gulp

The /build folder and /dist folder are created. All built files are placed in the build folder, and the distribution ready packages are placed in dist folder.

Distribution

Once the changes are in-place and ready for distribution, update package.json with new version, and run:

$ gulp

The /dist folder will contain distribution ready packages.

Contributing

If you would like to contribute code to Selenium Page Object Generator project you can do so through GitHub by forking the repository and sending a pull request.

When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also include appropriate test cases.

Before your code can be accepted into the project you must also sign the Selenium Page Object Generator CLA (Individual Contributor License Agreement).

That's it! Thank you for your contribution!

License

Copyright (c) 2015, 2016 Richard Huang.

This browser extension is free software, licensed under: GNU Affero General Public License (AGPL-3.0).

Documentation and other similar content are provided under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Licenses and Acknowledgements for Incorporated Software

Screenshot

screenshot

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.