webdriver-repl

1.0.2 • Public • Published

webdriver-repl

REPL interface to learn and debug the selenium webdriver API from terminal

Prerequisite

Requires JDK > 8 to be installed.

Installation

npm install -g webdriver-repl

🚨 NOTE: This library uses node-gyp to compile java code. So if you face any error during installation, check the node-gpy installation page to install the dependency based on the operating system.

Usage

wd-repl --browser chrome

or if you wanna debug a remote browser

wd-repl --seleniumAddress http://localhost:4444/wd/hub

Options:

type wd-repl --help to get the available CLI parameters

--browser

Supported browsers are chrome, firefox, edge, safari

--seleniumAddress

URL where the selenium server is running

--capabilities

The capability that is used to initialize the browser

For example, if we wanna launch the chrome browser in headless mode

wd-repl --browser chrome --capabilities "{ 'goog:chromeOptions': { 'agrs': ['--headless'] } }"

--classpath

To load 3rd party jar files and that can be used in the REPL session

wd-repl --browser chrome --classpath \
  ~/.m2/repository/io/github/sudharsan-selvaraj/wow-xhr/1.0.1/wow-xhr-1.0.1.jar \
  ~/.m2/repository/io/github/sudharsan-selvaraj/selenium-auto-wait/1.0.1/selenium-auto-wait-1.0.1.jar 

And the jarfiles can be imported as

> Import("io.github.sudharsan_selvaraj.WowXhr");

Package Sidebar

Install

npm i webdriver-repl

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

71.5 kB

Total Files

53

Last publish

Collaborators

  • sudharsan-selvaraj