GithubHelp home page GithubHelp logo

selenium-tests's Introduction

Using Selenium testing with crossbrowsertesting.com

Thanks for Chase at Crossborwsertesting for providing me the base for this snippet!

A sample script to show how to interact with the Selenium driver AND Crossborwsertesting's Rest API to take screenshots while passing commands to the browser.

I'm using NodeJS with the excellent webdriverio module to interact with Selenium.

The main routine is using the ES6 generator function with an external runner file (runner.js) to iterate through the yield points in the generator. webdriverio commands return promises and generator function with the runner let's me write a very linear looking, but fundamentally asynchronous operations.

At key points in the execution, I'm taking screenshots of the browser, using the Crossbrowsertesting Rest API.

NOTE

This is just a starting point, to demonstrate how to use Selenium, NodeJS and the CBT Rest API.

##To use

npm install

Put your crossborwsertesting credentials in secrets.json:

{
      "user": "[email protected]",
      "key": "yourkey"
}

I've put a few browser definitions in browser.json. You can add more by using the wizard on the Selenium testing tab.

Then finally:

node wdio_test

selenium-tests's People

Contributors

bfulop avatar

Watchers

 avatar  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.