This is an e2e testing example for this website using Selenium
.
First, clone the repository & install the dependencies:
#clone github repository git clone https://github.com/imranwijaya/selenium-typescript-example.git #after successful clone npm install
Run test with following command:
npm run test #run tests using browser specified in tests file #or npm run test:chrome #run tests using chrome headless browser #or npm run test:firefox #run tests using firefox headless browser
. ├── ... |── config/index.ts # Test config (baseUrl, username, password, etc) ├── lib/ │ ├── browser.ts # Builds WebDriver object for tests |── pages/ # Page Object Models |── reports/ # Test Report for the tests executed |── tests/ # Test Suites and Test Cases
To learn more about Selenium, take a look at the following resources: