Giter Club home page Giter Club logo

puppeteer-mocha-automated-testing's Introduction

puppeteer-mocha-automated-testing

logo image

Automated the Testing using Puppeteer, Mocha, chai. For example we can use linkidin account and few functionality to automated the testing

Prequesites for automated testing

  1. Node JS (v.1.8.10)
  2. Puppeteer JS
  3. Mocha
  4. Chai
  5. Mochawesome for Report generation)
  6. express JS (Web server to run generate Report)
  7. opn (open the report of testing automatically to browser)
  8. node-cmd (Run Command Line command)

Installation

  1. clone the project https://github.com/tariqulislam/puppeteer-mocha-automated-testing.git
  2. go to folder cd puppeteer-mocha-automated-testing
  3. run npm install

Directory Structure

|-- puppeteer-mocha-automated-testing
|---- mochawesome-report
|------ assets
|------ mochawsome.html
|------ mochawsome.json
|---- test (Directory for where the test file are contains)
|------ bootstrap.js (Puppeteer Configuration file)
|------ sample.spec.js (Sample Automated Testing file)
|---- package.json
|---- node_modules
|---- server.js (Web server to show generate report)

configure to run sample Automated Test

  1. Open the file test/sample.spec.js
  2. Add the Linkedin email or user name at line 35 for testing.
 await linkEmail.type('<[email protected]>'); // add the email address for linkedin //
  1. Add the Password at line 38
await linkPassword.type(''); // add password for linkedin account
  1. Then run the predefiend test by npm test form command line

puppeteer-mocha-automated-testing's People

Contributors

tariqulislam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

puppeteer-mocha-automated-testing's Issues

Login Button Selector

Error Login Button
TypeError: Cannot read property 'click' of null

<button class="btn__primary--large from__button--floating" data-litms-control-urn="login-submit" type="submit" aria-label="Iniciar sesión">Iniciar sesión</button>
  • what to do if there's not a class or id to us as selector?

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.