Coder Social home page Coder Social logo

remarkablemark / webdriverjs-recipes Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 1.33 MB

WebDriverJS Recipes (Selenium for Node.js)

License: MIT License

JavaScript 97.37% Gherkin 2.63%
webdriverjs selenium-webdriver selenium nodejs javascript chrome chromedriver firefox webdriver

webdriverjs-recipes's Introduction

WebDriverJS Recipes

build

Recipes and examples of how to perform automation with WebDriverJS (Selenium for Node.js).

See API documentation for more information on selenium-webdriver.

Prerequisites

Node.js:

brew install node

nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Yarn 1:

brew install yarn

Chrome:

brew cask install google-chrome

ChromeDriver:

brew install chromedriver

Firefox:

brew cask install firefox

geckodriver:

brew cask install geckodriver

Install

Clone the repository:

git clone https://github.com/remarkablemark/webdriverjs-recipes.git && cd webdriverjs-recipes

Use Node.js version:

nvm use

Install the dependencies:

yarn

Available Scripts

In the project directory, you can run:

yarn async-await

Automates a Firefox browser using async/await. See article.

yarn build

Builds driver with Firefox browser.

To build driver with Chrome browser:

SELENIUM_BROWSER=chrome yarn build

yarn chrome-profile

Launches Chrome profile page. See article.

The profile data is saved at ./my_profile_path/.

yarn cucumber

Runs browser automation test written in Cucumber. See artcile.

yarn find

Finds elements. See article.

yarn jest

Runs browser automation test with Jest.

yarn mocha

Runs browser automation test with Mocha. See article.

yarn resources

Gets the browser resource file URL's of a webpage. See article.

yarn screenshot

Takes and saves a screenshot to ./screenshot.png.

yarn wait-until

Waits until condition is true.

License

MIT

webdriverjs-recipes's People

Contributors

dependabot[bot] avatar mergify[bot] avatar remarkablemark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

asiellb

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.