Integrate Selenium WebDriver by running your existing test command in a Jenkins Pipeline on an agent with the project runtime, browser, and driver available. Start with a local browser on the agent; use Selenium Grid when you need remote browsers, parallel sessions, or broader browser and operating-system coverage. Jenkins orchestrates the run—your project still declares Selenium and configures its tests.
1. Make sure the tests run outside Jenkins
Before configuring CI, identify the command developers use to run the WebDriver suite, the required Java or other runtime, the browser and driver, and any environment variables or credentials. Jenkins should run that known command rather than conceal test setup in an ad hoc job.
For Java, add Selenium through the project’s build system. Selenium’s installation guide demonstrates the Maven dependency org.seleniumhq.selenium:selenium-java; select a release compatible with the project’s Java baseline instead of copying a version from an old tutorial. See Selenium’s library installation guide.
2. Run the suite in a Jenkins Pipeline
For an existing Maven project that runs its tests with mvn test and writes JUnit-format reports to Surefire’s default directory, a minimal Declarative Pipeline is:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
pipeline {
agent any
stages {
stage('Checkout') {
steps { checkout scm }
}
stage('WebDriver tests') {
steps {
sh 'mvn -B test'
}
}
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
This example assumes a Unix-like agent, a Maven project, and reports at the stated path; it is not a guarantee that every test framework writes there. Change sh to the appropriate Windows batch step where needed, use the repository’s actual test command and report path, and select an agent label that has the required environment. Configure credentials through Jenkins credentials rather than committing secrets to source.
Use Jenkins-managed Maven or JDK configuration when useful
The Pipeline Maven Integration plugin’s withMaven step can configure Maven, select Jenkins-managed Maven and JDK installations, apply Maven settings, and support report publishing. Use it when those controls fit the team’s setup; a basic pipeline does not need a Selenium-specific Jenkins job or plugin. See the Jenkins Pipeline Maven Integration documentation.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
3. Choose where the browser runs
Browser installed on the Jenkins agent
This is the simplest arrangement for an initial integration or a modest suite. Install a supported browser and its required driver on the agent, and ensure the agent’s operating-system user can launch the browser. Selenium Manager may configure drivers automatically when enabled, but verify compatibility among the selected Selenium, Java, browser, and driver versions. Selenium’s current Grid getting-started guide lists Java 11 or higher as a prerequisite for its documented setup; treat that as documentation-specific guidance and confirm the requirements for the versions you choose.
Selenium Grid for remote sessions or parallel runs
Grid routes WebDriver commands to remote browser instances, making it useful when build agents should not host browsers, when tests need concurrent sessions, or when you need browser and platform coverage. Selenium documents standalone and Hub/Node roles; the default remote endpoint uses port 4444. Configure the test code to create a RemoteWebDriver targeting the Grid URL, and ensure the Jenkins agent can reach that endpoint. See Selenium Grid overview and Grid getting started.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Keep the Grid endpoint private or enforce network and access controls. Selenium warns that an exposed Grid can allow outsiders to access infrastructure, internal applications, and files, or run binaries. Do not publish an unprotected endpoint to the public internet.
Dockerized test agent for a repeatable environment
Jenkins Pipeline can run stages in Docker images when the Docker Pipeline plugin is installed and the selected Jenkins agent is configured to run Docker. An image or repository Dockerfile can package the test runtime and dependencies. It does not eliminate the need to manage browser versions, fonts, shared memory, and network access to a Grid; validate those details in the image you use. See Jenkins: Using Docker with Pipeline.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Compare the execution choices
| Setup | Best fit | Main trade-off |
|---|---|---|
| Browser on Jenkins agent | Small suite or first CI integration | Simple infrastructure, but the agent’s browser and driver environment must stay compatible. |
| Selenium Grid | Remote browsers, parallel sessions, or browser/OS coverage | More operational and network-security work; provides a shared remote execution endpoint. |
| Dockerized test agent | Repeatable stage dependencies | Requires Docker-capable execution and maintained images; browser setup and Grid networking still need attention. |
4. Publish results and preserve debugging evidence
Publish machine-readable test reports with Jenkins’ JUnit support so failures are visible in the build. When a test fails, archive useful screenshots, browser logs, and application logs if the test framework can produce them. Separate assertion failures from infrastructure problems such as a missing browser, unreachable Grid, exhausted sessions, or incompatible versions; those failure types need different fixes.
5. Troubleshoot common failures
- Browser or driver cannot be found: confirm the browser is installed on the actual agent running the stage and available to its user. Check the chosen Selenium Manager behavior and the browser/driver compatibility for your selected versions.
- Tests pass locally but fail in Jenkins: compare runtime and browser versions, environment variables, filesystem paths, permissions, display/headless requirements, and network access. Run the same project command on an agent with the same environment before changing the Pipeline.
- Remote session cannot be created: verify the Grid URL and port, agent-to-Grid connectivity, Grid availability, and that the requested browser configuration is supported. Check Grid logs for session-capacity or node-registration issues.
- JUnit reports are missing: confirm the test command actually produces XML reports and that the Pipeline’s
junitglob matches their location. The Surefire path in the example is only suitable when the project writes reports there. - Docker stage cannot start or reach Grid: confirm the agent can run Docker, the Docker Pipeline plugin is installed, and container networking allows access to the browser or Grid endpoint.
6. Avoid the legacy Jenkins Selenium plugin as a default
The Jenkins Selenium plugin page describes a legacy Selenium 3 Grid integration and currently carries warnings about absent CSRF protection and potential OS command injection; it also says the plugin is up for adoption. Do not make it the default for new integrations. Prefer a Pipeline that runs the project’s tests and communicates with browser infrastructure through the project’s WebDriver configuration. See the Jenkins Selenium plugin page for its current status.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Performance, reliability, and resource planning
Parallel execution can shorten suite duration, but it also increases browser-session demand and resource use; add concurrency only when the agent or Grid has capacity. Selenium’s Grid guide offers 1 CPU and 1 GB RAM per browser as a reference allocation while cautioning that actual needs vary and should be measured. Treat this as a starting recommendation, not a universal sizing guarantee.
For reliability, keep browser and runtime versions deliberate, retain enough test artifacts to diagnose intermittent failures, and ensure the Pipeline reports failures rather than silently succeeding when tests or report publication fail. A local agent avoids a separate Grid service, while Grid centralizes browser execution but adds availability and network dependencies.
Or skip the browser setup
If the task is to capture a website rather than run interactive browser tests, ScreenshotNeo is a screenshot API and MCP server: a single GET request can return a PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with the outcome identified in response headers. Its MCP server lets Claude, Cursor, and other MCP clients use take_screenshot, get_page_info, and capture_pdf.
For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for options and setup. Free includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Recommended Free Tools
Frequently Asked Questions
Does Jenkins need a Selenium plugin to run WebDriver tests?
No. A Pipeline can run the project’s existing test command; Selenium remains a project dependency and browser automation library.
When should I move from a local browser to Selenium Grid?
Use Grid when remote browser execution, parallel sessions, or browser and operating-system coverage justify the added infrastructure and network-security work.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

