Selenium Java Articles
RSS feed83 articles found in Selenium Java
JUnit 6 raises the Java baseline to 17, unifies module versioning, adds native Kotlin coroutine support, and removes legacy modules. See what's new in JUnit 6.
Faisal Khatri
June 26, 2026
5 min read
Learn how to automate Selenium login tests with ChatGPT. Explore prompts, code walkthroughs, debugging tips, and best practices for better test generation.
Vipul Gupta
May 27, 2026
5 min read
Learn about Shadow DOM in Selenium, how to find elements using getShadowRoot(), JavaScriptExecuter and automate Shadow DOM with Selenium.

Navin Chandra
November 25, 2025
22 min read
Learn how to set up and run Selenium Proxy with Python to bypass IP bans, handle geo-restrictions, and scale browser automation securely.

Alex Anie
September 3, 2025
31 min read
Learn how to use Selenium Stealth Mode to bypass bot detection in web scraping with step-by-step setup, examples, and cloud testing on TestMu AI (Formerly LambdaTest).
Mayank Bhola
September 3, 2025
23 min read
Learn how to write effective Gherkin test cases with clear structure, tags, and scenario outlines to improve collaboration and automation.

Saniya Gazala
August 18, 2025
31 min read
Set up Selenium with Java, write your first WebDriver test, scale to parallel execution, and apply best practices for maintainable automation.

Salman Khan
August 1, 2025
24 min read
Learn how the Robot class in Selenium helps automate system-level tasks like file uploads, pop-ups, and keyboard events for more complete test coverage.

Saniya Gazala
July 19, 2025
21 min read
Learn how to perform Java unit testing using JUnit with step-by-step guidance on setup, writing test cases, and ensuring your code works as expected.
Deboshree
July 11, 2025
15 min read
Learn how to findElement() by text in Selenium for dynamic IDs and Classes. Overcome challenges, enhance automation testing, and gain practical insights.
Vipul Gupta
June 2, 2025
14 min read
Learn how to write JUnit test cases step by step with @Test, assertions, and arrange-act-assert, using runnable JUnit 6 examples and a real Selenium cloud run.
Faisal Khatri
December 2, 2024
24 min read
Common exceptions in automation testing and how to handle them with TestNG exception tests using expectedExceptions, with runnable Selenium examples.
Vipul Gupta
October 25, 2024
31 min read
Pagination divides a website's content across multiple pages, using a navigation panel with page-number buttons and first, next, previous, and last controls, as seen on Amazon, eBay, and Gmail, while Facebook uses infinite scrolling instead. Selenium Java automates clicking through these paginated pages on the TestMu AI cloud grid to verify each page's content.
Faisal Khatri
September 13, 2024
24 min read
Learn how to setup JUnit 5 on Windows, configure environment variables, install JUnit in IntelliJ IDEA, and write and run your first JUnit test in Java.
Sri Priya
July 31, 2024
5 min read
StaleElementReferenceException in Selenium occurs when a saved WebElement is no longer attached to the DOM. Learn how to handle and prevent it in Java.
Faisal Khatri
July 31, 2024
18 min read
Learn to write test cases in Java with Selenium WebDriver and TestNG: locate WebElements, add assertions, and run tests locally or on a cloud grid.
Vipul Gupta
July 8, 2024
26 min read
This TestNG guide will help you in creating a TestNG.xml file and then executing multiple test cases in parallel on a Selenium Grid.
Faisal Khatri
June 21, 2024
25 min read
Extent Reports is a library that generates customized, HTML-based test reports for Selenium, most commonly integrated through the TestNG framework. Generating a report requires three classes, ExtentSparkReporter to create the HTML file, ExtentReports to attach it, and ExtentTest to log each test's pass, fail, or skip status, with STANDARD and DARK available via the setTheme method.
Vipul Gupta
June 14, 2024
34 min read
Learn to handle authentication popups in Selenium WebDriver, explore its different types of alerts, and effectively manage login prompts during web automation.
Vipul Gupta
June 13, 2024
26 min read
Learn how to handle hidden elements in Selenium WebDriver with Java: JavaScriptExecutor clicks, getAttribute for text, isDisplayed checks, and hidden dropdowns.
Sri Priya
June 12, 2024
18 min read
Discover how to use Selenium sendkeys for sending keystrokes automatically! Dive into our blog for insights on effective sendkeys utilization.

Solomon Eseme
May 21, 2024
22 min read
ThreadLocal in Java is a class that gives each thread its own independent copy of a variable, and pairing it with Selenium WebDriver means every parallel test thread gets its own isolated WebDriver instance instead of sharing one. This eliminates cross-thread interference and removes the need for manual synchronization like locks, making parallel Selenium execution safer and more stable.
Vipul Gupta
May 7, 2024
32 min read
Ever wondered how to use Thread.sleep in Java? Learn everything there is to know about the method and using it in Selenium. Read more.
Faisal Khatri
April 25, 2024
27 min read
In this tutorial, learn how to handle Shadow root in Selenium Java using the getShadowRoot() method and JavaScriptExecuter.
Faisal Khatri
April 22, 2024
31 min read
Learn to take screenshot in Selenium Java and get in depth knowledge of why it is critical in the software testing lifecycle.

Tanay Kumar Deo
April 5, 2024
19 min read
Learn how to click on a button in Selenium with working Java, Python, and JavaScript examples covering left-click, right-click, double-click, drag-and-drop, JavascriptExecutor fallback, and explicit waits.
Faisal Khatri
March 28, 2024
38 min read
Fix the "Element Not Clickable at Point" error in Selenium. Learn causes like overlaps, delays, and proven solutions with examples.
Faisal Khatri
March 28, 2024
23 min read
Master the art of closing browser tabs in Selenium with Python and Java. Optimize your test automation with effective tab management.

Tanay Kumar Deo
March 21, 2024
41 min read
A modal dialog box in Selenium WebDriver Java is a Bootstrap modal window built from a trigger element, the modal container, and its modal content, which sits on top of the page and must be interacted with first. Selenium fetches this modal element and operates on its content, alongside handling related alerts and pop-up windows.
Vipul Gupta
March 20, 2024
36 min read
Stay ahead of the curve in software testing with our list of the 13 best Java testing frameworks for 2026.

Salman Khan
February 20, 2024
26 min read
How to install TestNG in Eclipse from the Marketplace or the update site, verify the plugin, convert an existing Java project, and run your first TestNG test.

Kritika Murari
February 12, 2024
13 min read
TestNG is a robust Java-based testing framework. Streamline parallel testing and leverage comprehensive reporting while harnessing the power of TestNG in Selenium.
Vipul Gupta
January 24, 2024
62 min read
Learn how to effectively manage dynamic dropdowns in Selenium WebDriver using Java. Master the art of automated testing for dynamic web elements.
Faisal Khatri
January 16, 2024
54 min read
assertTrue() is a method in JUnit 5's org.junit.Assertions class that verifies a supplied boolean condition evaluates to true, failing the test immediately when it does not. It is a hard assertion, meaning execution halts at the point of failure so dependent tests are skipped, unlike a soft assertion, which logs failures and lets the test run to completion.
Faisal Khatri
December 12, 2023
27 min read
Web Scraping or Web Data Extraction automatically extracts data from any target website using software tools and scripts. This blog delves into the intricacies of performing web scraping with Selenium Java for different websites.
Vipul Gupta
November 13, 2023
41 min read
NoSuchElementException is one of the most common exceptions in Selenium, which occurs when an element is not found on the page. This blog post discusses NoSuchElementException, why it occurs, and how to fix NoSuchElementException in Selenium with Java.
Vipul Gupta
November 6, 2023
28 min read
The @FindBy annotation in Selenium Java's Page Factory model lets testers declaratively specify how to locate a web element, such as by id, name, xpath, or css, making automation code more readable and maintainable. Using @FindBy also requires calling PageFactory's initElements method in the page object's constructor for the annotation to take effect.
Faisal Khatri
October 31, 2023
48 min read
Selenium visual regression testing compares baseline and current screenshots pixel by pixel to catch UI bugs like misaligned buttons before release.
Faisal Khatri
October 10, 2023
39 min read
Discover JUnit ErrorCollector, a crucial tool for comprehensive test coverage. Learn how it simplifies error handling, ensuring smooth test execution.
Sri Priya
October 5, 2023
30 min read
ElementClickInterceptedException in Selenium occurs when a click command cannot execute because the target WebElement is not clickable, typically because another WebElement is overlapping it. This Selenium Java tutorial explains the exception's causes and walks through fixing it in a sample test that logs into a demo site and clicks past a blocking overlay.
Faisal Khatri
September 18, 2023
40 min read
This blog delves into the intricacies of handling auto-suggestions in Selenium Java for web automation using different techniques.
Vipul Gupta
August 4, 2023
41 min read
How Thread.sleep() pauses a Java thread, why it takes milliseconds, and when Selenium's implicit, explicit and fluent waits are the better choice.
Faisal Khatri
July 24, 2023
41 min read
How Arrays.asList() converts an array to a List in Java, the fixed-size trap that throws UnsupportedOperationException, and when to wrap it in an ArrayList.
Arun Gupta
June 16, 2023
21 min read
This blog discusses some of the most common reasons for NoSuchWindowException in Selenium and the best practices to handle it.
Vipul Gupta
June 6, 2023
31 min read
This blog on JUnit Ignore Test annotation will provide valuable inputs and practical advice on how to disable/skip tests using different annotations.
Faisal Khatri
May 12, 2023
51 min read
SSL, or Secure Sockets Layer, is the security protocol that encrypts data between a browser and server using standards like AES, RSA, and TLS. Because Selenium WebDriver launches a fresh browser profile for every automation run, these certificates go missing and trigger connection-not-secure errors, which is why WebDriver scripts must handle SSL certificates explicitly across browsers.
Vipul Gupta
April 26, 2023
28 min read
Local website testing means hosting and testing a website on a developer's machine, often via a local server like XAMPP, before it reaches a staging or production environment. Selenium can automate this by pairing a WebDriver Java script with a cloud grid's tunnel app, connecting the local host to thousands of browser and OS combinations without touching the local infrastructure.
Vipul Gupta
February 8, 2023
21 min read
Automate toggle buttons in Selenium Java: locate each toggle by ID or CSS selector, click it to switch ON or OFF, and verify its state with isSelected().
Fidaa Berrjeb
November 24, 2022
20 min read
A fluent interface design pattern chains automation methods so each call returns an object exposing only the next valid action, turning Selenium test code into something read almost like human language. It relies on method chaining, static factory methods, and parameters simulated through those factories rather than passing raw test data directly into a method signature.
Faisal Khatri
October 27, 2022
42 min read
Get an HTTP response status code with Apache HttpClient: the getCode() call, what each 2xx to 5xx class means, and how to assert on it in a test.
Vipul Gupta
July 11, 2022
25 min read
This article discusses various techniques on how to select multiple Checkboxes in Selenium WebDriver using Java.
Vipul Gupta
June 20, 2022
23 min read
isDisplayed() is a Selenium WebDriver method that returns a Boolean confirming whether a located web element is currently visible on the page, helping avoid false test failures caused by elements that have not yet rendered. Selenium also provides isEnabled() to check if an element can be interacted with and isSelected() to check whether a checkbox or radio button is selected.
Shalini Baskaran
April 22, 2022
25 min read
Learn window handling in Selenium WebDriver using Java with getWindowHandle, getWindowHandles, switchTo, and Selenium 4 newWindow API examples.
Ria Dayal
March 24, 2022
23 min read
In this JUnit Jupiter tutorial, we explore the basic usage of Jupiter, its unit testing capabilities, and how you can run JUnit tests in Jupiter.
Shalini Baskaran
March 16, 2022
30 min read
Java Event Listeners in Selenium WebDriver use the WebDriverEventListener interface, which defines over 20 methods such as beforeClickOn, afterFindBy, and onException, to automatically log actions and exceptions during a test run. Wrapping a WebDriver instance in EventFiringWebDriver and registering a class that implements these methods captures navigation, clicks, and input events without manually adding a log statement after each action.
Vipul Gupta
February 4, 2022
19 min read
Learn the difference between findElement and findElements in Selenium, plus findElement examples using ID, Name, ClassName, TagName, XPath and CSS selectors.
Ria Dayal
January 18, 2022
32 min read
Learn how to effectively Handle Captcha in Selenium with expert tips and techniques. Elevate your web automation testing proficiency.
Ria Dayal
January 6, 2022
26 min read
Selenium is a free, open-source suite of tools, including Selenium IDE, WebDriver, and Grid, used to automate browser testing across multiple programming languages such as Java, Python, C#, and Ruby. Selenium WebDriver interacts directly with the browser without an intermediary, unlike the older Selenium RC, and Selenium Grid supports standalone, hub-and-node, and fully distributed modes for running tests in parallel.

Shahzeb Hoda
January 3, 2022
28 min read
JUnit 5 vs TestNG compared on annotations, suites, parameterization, parallel execution, and reports, so you can pick the right framework for Selenium tests.
Shalini Baskaran
December 27, 2021
44 min read
Learn to switch between iframes in Selenium Java with switchTo().frame() by id, index, or WebElement, handle nested iframes, and switch back to the main page.
Shalini Baskaran
December 15, 2021
14 min read
In this JUnit 5 Mockito tutorial, we will see how Mockito can be used with the JUnit unit testing framework and its new features in the bucket for JUnit 5.
Ruchira Shukla
December 6, 2021
21 min read
Learn how to minimize browser windows in Selenium WebDriver using JUnit, with the minimize() method, the setPosition() workaround, and keyboard shortcuts.
Ria Dayal
November 30, 2021
18 min read
In this blog, we will see how to perform parallel test execution in TestNG on multiple browsers for Selenium automation testing.

Harita Ravindranath
November 12, 2021
31 min read
In this TestNG tutorial, you will learn how to use different assertions in TestNG and see how they are helpful in Selenium automation testing.
Praveen Mishra
November 1, 2021
27 min read
In this blog, you will learn how to use @RepeatedTest annotation in JUnit 5 to achieve the repetition of test cases and the use case for that.
Ruchira Shukla
October 27, 2021
17 min read
In this blog, we will see how to set test case priority in TestNG while performing Selenium automation testing.
Ria Dayal
October 12, 2021
28 min read
Page Factory in Selenium is a built-in class that implements the Page Object Model using @FindBy and initElements to reduce repetitive test code.

Himanshu Sheth
October 11, 2021
34 min read
In this Selenium TestNG tutorial, we will learn about the Reporter Class in TestNG along with the different parameters it offers.
Ria Dayal
October 1, 2021
25 min read
A data-driven framework in Selenium separates test logic from test data, letting testers change input values without editing code. Apache POI reads xls files through its HSSFWorkbook class and xlsx files through XSSFWorkbook, and TestNG's DataProvider then feeds each Excel row into a test method for cross-browser testing.

Himanshu Sheth
September 28, 2021
54 min read
In this blog, we deep dive into how to perform parallel test execution with the JUnit 5 framework and Selenium.
Shalini Baskaran
September 11, 2021
29 min read
JUnit 5 extensions explained: how @ExtendWith and the Extension API add behavior to test classes and methods, with lifecycle and parameter examples.
Ghislain Kalonji Mukendi
August 3, 2021
39 min read
In this blog, you will learn to handle cookies in Selenium WebDriver, clearing session cookies using Selenium, and more.
Shalini Baskaran
July 28, 2021
17 min read
TestNG removed JUnit support in 7.10.0. Learn how to run JUnit and TestNG Selenium tests together on the JUnit Platform, with working Java examples.
Ruchira Shukla
July 27, 2021
24 min read
Selenium WebDriver dropped the native ability to modify HTTP request headers that Selenium RC once supported, so testers automating in Java need alternate techniques to change those headers during a test run. HTTP headers fall into request, response, representation, and payload categories, and a Firefox extension can modify them but only works with Firefox, not Chrome or Edge.

Harshit Paul
June 23, 2021
20 min read
TestNG and JUnit are the top Java testing frameworks. Compare annotations, parallel execution and grouping to pick the right one for Selenium testing.
Ruchira Shukla
May 24, 2021
23 min read
Is JUnit 4 different than JUnit 5? In this blog, learn the differences in annotations, how to migrate tests from JUnit4, and to execute tests with JUnit 5.
Shalini Baskaran
April 26, 2021
20 min read
Generate TestNG reports in Jenkins with the TestNG Results Plugin, read the trend graph and failed tests, then share the report with your team by email.

Piyusha Podutwar
February 4, 2021
27 min read
Learn how groups in TestNG let you run smoke, regression, or specific tests on demand, with examples for @BeforeGroups, dependsOnGroups, and the command line.

Himanshu Sheth
December 21, 2020
32 min read
Want to run JUnit tests from the command line? Read on to learn how to compile and run JUnit tests from the command line in different ways.

Himanshu Sheth
November 19, 2020
32 min read
Learn how to use DataProvider in TestNG to inject multiple values into a single Selenium test, including inheritance, Excel, parallel execution, and cloud runs.

Kritika Murari
August 18, 2020
17 min read
Learn how to create your first TestNG project in Eclipse with this step-by-step guide for Selenium WebDriver and run your first Selenium TestNG Script.
Praveen Mishra
July 31, 2020
21 min read
Stop rewriting tests for every input. Learn JUnit parameterized tests with @ParameterizedTest and data sources, with Selenium examples.

Harshit Paul
April 21, 2020
24 min read
Page object model helps to reduce code duplication and improve test maintenance. Read now to learn how to implement POM design pattern with examples in Java.
Rahul Rana
April 13, 2020
27 min read






![Selenium With Java: A Hands-On Tutorial [2026]](https://assets.testmuai.com/resources/images/How-to-Use-Selenium-With-Java.png)




![A Complete Guide To Exception Tests In TestNG [With Examples]](https://assets.testmuai.com/resources/uploads/2023/04/unnamed2520-25202023-04-14T155310.134.png)













![How to Click on a Button in Selenium [With Examples]](https://assets.testmuai.com/resources/images/meta/how-to-click-on-a-button-in-selenium-og.webp)



![13 Best Java Testing Frameworks [2026]](https://assets.testmuai.com/resources/images/meta/best-java-testing-frameworks.webp)








![How to Use JUnit ErrorCollector [With Examples]](https://assets.testmuai.com/resources/uploads/2023/10/unnamed-2023-10-05T122432.606.png)



![How To Use Arrays.asList() In Java [With Examples]](https://assets.testmuai.com/resources/uploads/2023/06/How-To-Use-Arrays.asList-In-Java-With-Examples-OG.png)

![How To Use JUnit Ignore Test Annotation [With Examples]](https://assets.testmuai.com/resources/images/meta/junit-ignore-test-annotation.webp)










![FindElement And FindElements In Selenium [Differences]](https://assets.testmuai.com/resources/uploads/2022/01/findelement-and-findelements-in-selenium.jpg)



![How To Switch Between iFrames In Selenium Java [Tutorial]](https://assets.testmuai.com/resources/uploads/2021/12/Switch-Between-iFrames-In-Selenium-Java.jpg)









![Parallel Testing With JUnit 5 And Selenium [Tutorial]](https://assets.testmuai.com/resources/uploads/2021/09/JUnit-5-parallel-test-execution-1.png)









![How To Use DataProviders In TestNG [With Examples]](https://assets.testmuai.com/resources/uploads/2020/08/Dataproviders-TestNG.jpg)


