Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Main Repository

Disclaimer

Selenium is a browser automation tool. This repository only covers Selenium setup for the Node.js (Javascript) programming language.

To continue further development with this tool, make sure to read the official Selenium documentation.

Unfortunately, Selenium itself doesn't support username:password authentication for HTTP/HTTPs proxies; therefore you'll need to have your IP whitelisted.

You can do that by following the guidelines listed here.

Prerequisites

Optional:

You'll need to install at least one of the above WebDrivers in the Installation part.

Installation

  1. Once you have all the required prerequisites ready, create your project folder:
mkdir node_selenium
cd node_selenium
npm init
npm install selenium-webdriver
image
  1. When the project directory is set up, you'll need to install one of the WebDrivers from the Prerequisites section.

Firefox

image

Chrome

image
  1. Download the example script according to the WebDriver you are using with one of these commands:

Firefox

curl https://raw.githubusercontent.com/Decodo/Selenium/master/nodejs/firefox/example.js > example.js

Chrome

curl https://raw.githubusercontent.com/Decodo/Selenium/master/nodejs/chrome/example.js > example.js

  1. Your project folder should now be populated with the example.js file.

Configuration

To configure the example script with a different endpoint, simply edit the let addr = line in within punctuation marks('') as in the example:

image

You can test the script by running the node example.js command while in your project folder.

A browser window will appear with the targeted website, and a proxy IP should be visible in the console output:

image

Need help?

Email - [email protected]
Live chat 24/7