/seleniumjs-reuse-session

Selenium re-using a created session in node and mocha

Primary LanguageJavaScript

  1. Download and copy chromedriver.exe to the folder's root
  2. Open CMD and write(execute) chromedriver.exe
  3. Open another CMD window and write:
curl -XPOST http://localhost:9515/session -d "{\"desiredCapabilities\":{\"browserName\":\"chrome\"}}"
  1. You must see a chromedriver window and in the CMD a JSON response. Copy and paste in the code the sessionID value (is at the begining of the JSON response).
  2. Run the test:
npm run test