Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Open In App
Next Article:
Selenium with Java Tutorial
Next article icon

Selenium with Java Tutorial

Last Updated : 29 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Deep dive into the powerful world of automated web testing and learn how to harness the capabilities of Selenium with Java, from setting up your environment to writing effective test scripts. Whether you're new to automated testing or looking to upscale your skills, this Selenium with Java tutorial will equip you with the knowledge to create robust and reliable tests for web applications.

Selenium is a widely used tool for testing web-based applications to see if they are doing as expected. It is a prominent preference amongst testers for cross-browser testing and is viewed as one of the most reliable systems for web application automation evaluation. Selenium is also platform-independent, so it can provide distributed testing using the Selenium Network.

Table of Content

  • How does Selenium Work?
  • Why Select Selenium with Java?
  • Steps to Configure Java Environment
  • Create a Selenium with Java Project in Eclipse
  • Steps for Writing Code

Its features, reach, and strong community assistance make it a powerful device for effective web application testing. The tutorial starts with basic concepts like setting up Selenium WebDriver and navigating web elements. It then moves into more advanced topics, such as handling dynamic elements, managing waits, automating form submissions, and using frameworks like TestNG for creating structured test scripts. This tutorial is ideal for beginners and advanced users who want to efficiently create test automation suites with real-world examples.

To get started, visit the full course here.

What is Selenium with Java

Selenium with Java refers to the combination of Selenium, a popular tool for automating web browsers, with the Java programming language. Selenium specifically, is used with Java to create automated tests for web applications. Java provides a robust and versatile environment for writing Selenium scripts, offering features such as object-oriented programming, extensive libraries, and platform independence. This combination enables developers and testers to automate interactions with web elements, simulate user actions, and verify expected behavior across different browsers and operating systems.

How Does Selenium Work?

Working for the Selenium WebDrive is explained below:

  1. User code: The user creates automation scripts. These scripts contain instructions and commands for interacting with web elements and web pages.
  2. Selenium Client Library: This library acts as a bridge between user code and WebDriver. It provides several APIs that allow user code to control web browsers and facilitate web interaction commands.
  3. WebDriver API: The WebDriver API defines custom instructions for internet interfaces. Various browser providers have applied their own WebDriver implementations, which can be well-matched with this API. It establishes a common language for browser automation.
  4. Browser-precise driving force: Each browser (e.g., Chrome, Firefox) has its personal WebDriver implementation (e.g., ChromeDriver, GeckoDriver). These drivers are liable for starting a specific browser and setting up a conversation channel with the WebDriver.
  5. Browser: The Webdriver sends commands to the browser to execute specific actions, like clicking elements or inputting text, which the browser then carries out accordingly.

Architecture of Selenium WebDriver

Why Select Selenium with Java?

Below we have mentioned the reasons to choose Selenium with Java for testing the application.

  1. Versatility: Java is one of the most typically used languages for web automation examining. It holds a massive matter of libraries and programs under Selenium WebDriver.
  2. Compatibility and Stability: Selenium has superior service Java making it a very compatible and robust integration.
  3. Ease of Learning and Use: Java is known for its readability and ease of learning, rendering it accessible for both amateurs and advanced coders.
  4. Large Community: Java has a large group of developers and inspectors using Selenium and Java which furnish valuable information, maintenance, CE, and solutions to common issues and struggles encountered by Selenium users.
Why Select Selenium with Java

Steps to Configure Java Environment

Step 1: Firstly, configure the Java Development Kit on your system. If not configured, then refer to the following installation steps here.

Step 2: Ensure that Java has been successfully installed on your system by running the command.

java -version

Step 3: Now, install an Integrated Development Environment (IDE) such as Eclipse, IntelliJ IDEA, or NetBeans. For this, we are using Eclipse so download it from here.

Step 4: Install the Selenium WebDriver library for Java. Download it from here. Extract the Zip File and complete the installation.

Step 5: We need web browsers such as Chrome, Firefox, Edge, or Safari. So, for this article demonstration, we will use the Chrome browser. A ChromeDriver executable file that matches your Chrome version. Download the latest release from here.

Step 6: Extract the zip file and copy the path where the chromedriver.exe file is, it is required in further steps. (e.g. - D:/chromedriver_win32/chromedriver.exe)
Extract Zip file

Create a Selenium with Java Project in Eclipse

Step 1: Launch Eclipse and select File -> New -> Java Project.

Create Java Project

Step 2: Enter a name for your project (e.g., SeleniumJavaTutorial) and click Finish.

Create Java Project

Step 3: Right-click on your project in Package Explorer and select Properties.

Select Properties

Step 4: Select Java Build Path from the left panel click on the libraries tab and then select Classpath. Click on Add External JARs and browse to the location where you downloaded the Selenium WebDriver library (e.g., selenium-java-4.1.0.zip).

Add External JARs

Step 5: Select all the JAR files inside the zip file and click Open and also all the files inside the lib folder. (D:\selenium-java-4.11.0, D:\selenium-java-4.11.0\lib).

Select JAR files

Step 6: Click Apply and Close to save the changes.

Save changes

Step 7: Create a new package under your project by right-clicking on the src folder and selecting New -> Package.

Create New Package

Step 8: Add the name of your package (e.g., WebDriver)

Add name of Package

Step 9: Create a new class under your package (e.g., WebDriver) by right-clicking on the package and selecting New -> Class, then Enter a name for your class and click Finish.

Create New Class

Step 10: After all the steps your file structure looks like this.

File Structure

Steps for Writing Code

Step 1: Import the required packages at the top of your class:

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

After importing if still getting errors in import just delete the module-info.java file.

Step 2: Create a main class inside the Web class.

public class Web {

public static void main(String[] args) {

}

}

Step 3: Set the system property for ChromeDriver (path to chromedriver executable). (e.g., D:/chromedriver_win32/chromedriver.exe)

System.setProperty("webdriver.chrome.driver", "D:/chromedriver_win32/chromedriver.exe");

Step 4: Create an instance of ChromeDriver.

WebDriver driver = new ChromeDriver();

Step 5: Navigate to the desired website.

driver.get("https://www.geeksforgeeks.org/");

Step 6: Get and print the page title.

String pageTitle = driver.getTitle();

System.out.println("Page Title: " + pageTitle);

Step 7: Wait for a few seconds.

try {

Thread.sleep(3000);

} catch (InterruptedException e) {

e.printStackTrace();

}

Step 8: Close the browser.

driver. Quit();

Below is the Java program to implement the above approach:

Java
package WebDriver;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Web {
    public static void main(String[] args) {
        // Set the system property for ChromeDriver (path to chromedriver executable)
        System.setProperty("webdriver.chrome.driver", "D:/chromedriver_win32/chromedriver.exe");

        // Create an instance of ChromeDriver (launch the Chrome browser)
        WebDriver driver = new ChromeDriver();

        try {
            // Navigate to the desired website (GeeksforGeeks in this example)
            driver.get("https://www.geeksforgeeks.org/");

            // Get and print the page title
            String pageTitle = driver.getTitle();
            System.out.println("Page Title: " + pageTitle);

            // Wait for a few seconds (for demonstration purposes only)
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } finally {
            // Close the browser
            driver.quit();
        }
    }
}

Output:
ggeks-selium

Conclusion

This Selenium with Java tutorial has shown you how to automate web testing using Selenium and Java. Through this tutorial you've learned everything from setting up your tools to writing effective test scripts. Now, you're ready to improve testing efficiency and ensure your web applications work smoothly.


Next Article
Selenium with Java Tutorial
author
the_ravisingh
Improve
Article Tags :
  • Geeks Premier League
  • Software Testing
  • Selenium
  • selenium
  • Geeks Premier League 2023

Similar Reads

    Selenium Python Tutorial
    Selenium is a powerful tool for controlling web browsers through programs and performing browser automation. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python , Java , C# , etc, we will be working with Python. Selenium Tutorial cover
    9 min read
    Junit Test with Selenium WebDriver
    Selenium is a browser automation tool that is used for testing purposes while Junit is a unit testing framework and by integrating them both we can write an automation test that will give the direct result of assertions. Junit is used with Java applications and Java also supports Selenium thus, we c
    8 min read
    Run Selenium Tests with Gauge
    Gauge is an open-source framework for test automation that is especially useful for Behavior Driven Development (BDD). It is characterized by its simplicity, scalability, and compatibility with other languages, such as Java, C#, and JavaScript. Gauge and Selenium work together to provide reliable, u
    5 min read
    How to Use AutoIT with Selenium Webdriver?
    Selenium WebDriver has revolutionized web automation, but it faces limitations when dealing with native Windows dialogs. This is where AutoIT comes to the rescue, bridging the gap between web and desktop automation. For testers and developers working on web applications, understanding how to integra
    8 min read
    How to Configure Selenium in Eclipse with Java
    Selenium is a suite of open-source tools and libraries used for automating web browsers. It enables users to write and execute scripts that interact with web elements, mimicking user actions such as clicking buttons, filling out forms, and navigating through web pages. Selenium supports multiple pro
    3 min read
    Selenium Tool Suite
    Selenium is a very well-known open-source software suite, mainly used for testing web browsers and web applications by automating some processes. It comes with a set of tools and libraries that allow developers or testers to automate some functions related to web browsers and web applications. Selen
    7 min read
    How to start with Selenium Debugging?
    Debugging is essential for any developer, especially when working with Selenium for test automation. As your test scripts grow in complexity, the chances of encountering unexpected issues increase. Selenium debugging allows you to identify and resolve these issues by systematically analyzing your co
    6 min read
    Selenium Basic Terminology
    Selenium is a very well-known open-source automated testing framework mainly used to automate tasks and perform various automation tests related to web browsers. It provides a wide range of suites and libraries to do various tasks and make the work easy for developers and testers. Using Selenium, de
    9 min read
    How to setup Chrome driver with Selenium java on MacOS?
    Automation is now a critical detail of software program development, and Selenium stands proud as one of the leading tools for browser automation. if you plan to use Selenium with Java on macOS, the first step is to install ChromeDriver. ChromeDriver is a critical thing that enables Selenium to talk
    3 min read
    Gmail Login using Java Selenium
    Automating Gmail login using Selenium WebDriver and Java is a common task for beginners learning web automation. It’s an excellent exercise to understand how Selenium interacts with web elements and handles user inputs. This article will guide you through the process of automating Gmail login, provi
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `${editorValue}`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('.suggest-bottom-btn').css("display","none"); $('#suggestion-section-textarea').hide() $('.thank-you-message').css('display', 'flex'); $('.suggestion-section').css('display', 'none'); jQuery('#suggestion-modal-alert').hide(); }, error:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 4 Words and Maximum Words limit is 1000."); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences