This repository contains automated tests for the Alerts functionality on demoqa.com using Selenium with JavaScript.
This project aims to automate the testing of alert functionalities available on the demoqa.com website. It covers various alert types, including simple alerts, confirmation alerts, and prompt alerts, ensuring expected behaviors are maintained.
Before you begin, ensure you have met the following requirements:
- Node.js (version 14 or later)
- npm (Node package manager)
- Selenium WebDriver for JavaScript
- A web browser (e.g., Chrome, Firefox)
-
Clone the repository:
git clone /~https://github.com/yourusername/alerts-automation-selenium.git
-
Navigate into the project directory:
cd alerts-automation-selenium
-
Install the dependencies:
npm install selenium-webdriver
-
Install the browser driver (e.g., ChromeDriver for Chrome):
npm install chromedriver
To execute the test suite, run:
node test.js
Ensure that your browser is installed and the driver is configured correctly.
The following test cases are included in this repository:
- Simple Alert: Verify the behavior of the simple alert.
- Confirmation Alert: Check the acceptance and rejection of the confirmation alert.
- Prompt Alert: Validate input handling in the prompt alert.
Feel free to expand or modify these tests based on your needs.
Contributions are welcome! If you have suggestions for improvements or bug fixes, please create an issue or submit a pull request.
- Fork the project.
- Create your feature branch
git checkout -b feature/YourFeature
- Commit your changes
git commit -m 'Add some feature'
- Push to the branch
git push origin feature/YourFeature
- Open a pull request.
The project follows a simple structure with the following directories:
├── AlertsFrameWindows
│── alerts.js
│── browser-windows.js
│── frames.js
│── modal-dialogs.js
│── nestedframes.js
├── BookStoreApplication
│── books.js
│── profile.js
│── login.js
├── Elements
│── buttons.js
│── checkBox.js
│── dynamic-properties.js
│── links.js
│── radioButton.js
│── textBox.js
│── upload-download.js
│── webtables.js
├── Forms
│── automation-practice-form.js
├── Interactions
│── dragabble.js
│── droppable.js
│── resizable.js
│── selectable.js
│── sortable.js
├── Widgets
│── accordian.js
│── auto-complete.js
│── date-picker.js
│── menu.js
│── progress-bar.js
│── select-menu.js
│── slider.js
│── tabs.js
│── tool-tips.js