imranwijaya / selenium-typescript-example

Selenium WebDriver Typescript using Page Object Models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selenium WebDriver Typescript using Page Object Models

This is an e2e testing example for this website using Selenium.

Getting Started

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

Folder Structure

.
├── ...
|── 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

Learn More

To learn more about Selenium, take a look at the following resources:

About

Selenium WebDriver Typescript using Page Object Models

License:MIT License


Languages

Language:TypeScript 100.0%