SeleniumBase/integrations/node_js
Michael Mintz aac8d29dd2 Update example tests 2022-04-26 09:26:56 -04:00
..
ReadMe.md Update one of the docs 2022-02-09 18:57:43 -05:00
__init__.py Prioritize pytest over nosetests 2018-07-25 01:26:15 -04:00
index.html Update examples and docs 2021-05-22 14:15:36 -04:00
my_first_test.py Update example tests 2022-02-05 23:07:03 -05:00
npm-shrinkwrap.json Add "npm-shrinkwrap.json" for an optional integration 2022-02-09 18:57:27 -05:00
package.json Use "express ~4.17.1" 2019-06-29 16:17:40 -04:00
server.js Use "CTRL+C" instead of "CTRL-C" in console messages 2021-02-18 23:40:55 -05:00
test_demo_site.py Update example tests 2022-04-26 09:26:56 -04:00

ReadMe.md

Creating a Test Runner with NodeJS + Express

You can create a customized web app for running SeleniumBase tests by using NodeJS and Express. (This tutorial assumes that you've already installed SeleniumBase by following the instructions from the top-level ReadMe file.)

1. Install NodeJS (if not installed)

2. Upgrade NodeJS (if using an older version)

npm install -g npm@latest

3. Install the Example Test Runner for SeleniumBase from the integrations/node_js folder (npm ci has a speed improvement over npm install.)

npm ci

(You should see a node_modules folder appear in your node_js folder.)

4. Run the NodeJS server for your SeleniumBase Test Runner web app

node server.js

(You can always stop the server by using CTRL+C.)

5. Open the SeleniumBase Test Runner web app

6. Run an example test

Click on a button to run a SeleniumBase example test.

7. Expand your web app

Now that you have a web app for running SeleniumBase tests, you can expand it to run any script that you want after pressing a button.