Skip to content

This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.

Notifications You must be signed in to change notification settings

JRH89/selenium-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Testing

This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.

Table of Contents

  1. Installation
  2. Usage
  3. Configuration

Installation

Follow these steps to install and set up the project:

  1. Clone the repository: First, you need to clone the repository to your local machine.

    git clone https://github.com/jrh89/selenium-testing.git
  2. Navigate to the project directory: Change your current directory to the project directory.

    cd selenium-testing
  3. Install dependencies: Install all the necessary dependencies using npm.

    npm install

Usage

To run the tests, use the following command:

npm test

Configuration

The project includes a config.js file where you can set various configuration options to customize the tests according to your needs. This file includes URLs, credentials, and other parameters used in the tests.

Editing the Configuration

To customize the tests, follow these steps:

  1. Open the config.js file: Locate and open the config.js file in the project directory. This file contains configuration settings for various tests.

  2. Modify the configuration settings: Update the values in the config.js file to suit your testing requirements. Below is an example config.js file with explanations of each field:

    export const config = {

url: 'http://www.hookerhillstudios.com/Login', validCredentials: { email: 'testuser@testuser.com', password: 'Testing123!', }, loginButtonText: 'Login', expectedUrl: 'https://www.hookerhillstudios.com/', google: { url: 'http://www.google.com', searchQuery: 'Selenium WebDriver', expectedTitle: 'Selenium WebDriver', homeTitle: 'Google' }, formSubmissionTest: { url: 'http://www.hookerhillstudios.com/Login', credentials: { email: 'testuser@testuser.com', password: 'Testing123!' }, loginButtonText: 'Login', expectedUrl: 'https://www.hookerhillstudios.com/' }, hackerNewsTest: { url: 'https://news.ycombinator.com/newest', // Use the 'newest' section URL for the test expectedNumberOfArticles: 100, timestampSelector: '.age', // Selector for timestamps articleSelector: '.athing', // Selector for article containers articleTitleSelector: '.storylink', // Selector for article titles } ```

  1. Edit the URLs, credentials, and other parameters: Modify the values in the config.js file to suit your testing needs.

  2. Save the config.js file: After making the necessary changes, save the file.

  3. Run the tests:

    npm test

By following these steps, you can customize the Selenium tests to work with different websites, credentials, and other parameters, making the testing framework versatile and adaptable to various use cases.

About

This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published