Skip to content

This repository contains a Selenium WebDriver script in Java to automate window switching, maximize the new window, perform scroll actions using JavaScript and return to the main window for closure.

Notifications You must be signed in to change notification settings

niths09/Selenium_SwitchWindowScript_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Switch Window and Scroll Automation Script

Description

This project demonstrates the use of Selenium WebDriver to automate switching between browser windows and performing scrolling actions using JavaScript Executor. The script opens a new browser window, switches to it, performs scrolling operations, and then returns to the main window, ensuring clean and efficient automation of window handling.

Features

  • Automates window switching between the main and new browser windows.
  • Maximizes the newly opened window for better visibility.
  • Implements smooth scroll-down and scroll-up actions using JavaScript Executor.
  • Waits between operations to simulate real user interactions.
  • Ensures all browser windows are properly handled and closed after execution.

Prerequisites

To run this project, ensure the following are installed and configured:

  1. Java Development Kit (JDK): Version 8 or higher.
  2. Selenium WebDriver: Version 4.25.0 or higher.
  3. ChromeDriver: Compatible version matching your installed Chrome browser.
  4. IDE: IntelliJ IDEA, Eclipse, or any other Java IDE for running the code.
  5. Browser: Google Chrome for executing the automated tests.

Technologies Used

  • Java: Programming language used for writing the script.
  • Selenium WebDriver: Automation tool for browser interactions.
  • ChromeDriver: WebDriver for controlling Google Chrome.
  • JavaScript Executor: For performing scroll actions on web pages.

About

This repository contains a Selenium WebDriver script in Java to automate window switching, maximize the new window, perform scroll actions using JavaScript and return to the main window for closure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages