REPL
interface to learn and debug the selenium webdriver API from terminal
Requires JDK > 8 to be installed.
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.
wd-repl --browser chrome
or if you wanna debug a remote browser
wd-repl --seleniumAddress http://localhost:4444/wd/hub
type wd-repl --help
to get the available CLI parameters
Supported browsers are chrome
, firefox
, edge
, safari
URL where the selenium server is running
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'] } }"
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");