Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Codeception WebDriver failures on Windows 7 usually have one of three causes: the driver executable cannot be found, the Selenium/driver endpoint is not running at the configured host and port, or the browser and driver versions cannot create a session. Fix them in that order. Then address ElementNotFound and timeout failures as synchronization and locator problems, not as driver-installation problems.

Start with the failure category

Open tests/acceptance/Acceptance.suite.yml and identify the transport before changing settings.

  1. Driver discovery: messages such as “driver executable not found” or PATH errors mean Selenium cannot locate chromedriver.exe or geckodriver.exe.
  2. Transport: “connection refused”, “unable to connect”, or an immediate timeout usually means the Selenium server or direct driver is stopped, blocked, or listening on a different host, port, or path.
  3. Session creation: “session not created” commonly means the browser generation and driver generation are incompatible.
  4. Test synchronization: ElementNotFound, stale elements, and click timeouts usually mean the test searched too early or used an imprecise locator.

Turn on evidence before making several changes at once. Set debug_log_entries above zero and enable JavaScript error logging when useful. Save the complete first error, the browser and driver versions, the configured endpoint, and the first failing step.

Install the WebDriver module and create a known-good configuration

Install or update the Codeception module

From the project directory, install the WebDriver module with Composer:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Dell OptiPlex 9020 Desktop Computer - Intel Core i5 (4th Gen) i5-4590 3.30 GHz - 8 GB DDR3 SDRAM - 500 GB HDD - Windows 7
  • Processor Model: i5-4590
  • Standard Memory: 8GB
  • Total Hard Drive Capacity: 500GB
  • Operating System: Windows 7
composer require --dev codeception/module-webdriver

Run the command with the PHP and Composer installation used by your test job. Mixing a global Composer, a different PHP executable, and the project’s vendor directory can make the module appear to be installed while the test runner uses another copy.

Use Selenium Server on its normal endpoint

A Selenium setup normally listens on 127.0.0.1:4444. Start the Selenium process in a separate console, then match the same host and port in the suite configuration:

modules:
    enabled:
        - WebDriver:
            url: 'http://127.0.0.1:4444'
            host: '127.0.0.1'
            port: 4444
            browser: chrome
            wait: 5
            connection_timeout: 30
            request_timeout: 30
            capabilities:
                browserName: chrome

The exact Selenium startup command depends on the Selenium version and Java installation in your project. The important rule is that the process must already be running and its listening address must equal the values in Acceptance.suite.yml.

Connect directly to ChromeDriver

For a direct ChromeDriver arrangement, launch the matching executable separately, commonly on port 9515, and point Codeception at that endpoint:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
modules:
    enabled:
        - WebDriver:
            url: 'http://127.0.0.1:9515'
            host: '127.0.0.1'
            port: 9515
            browser: chrome
            wait: 5
            connection_timeout: 30
            request_timeout: 30
            capabilities:
                browserName: chrome

Do not start Selenium on 4444 and configure Codeception for 9515, or vice versa. Start the direct driver in another console and leave that window open while the suite runs.

Rank #2
Dell OptiPlex 990 DT/Core i7-2600 Quad @ 3.40 GHz/12GB DDR3/1TB HDD/DVD-RW/Windows 7 PRO 64 BIT
  • Microsoft Authorized Refurbisher
  • Windows 7 Professional 64bit
  • PACKAGE DOES NOT include monitor or keyboard/mouse

Use Firefox with GeckoDriver

For Firefox, replace the browser capability and start a compatible GeckoDriver process. Keep the host, port, and URL consistent with the process you launched:

modules:
    enabled:
        - WebDriver:
            url: 'http://127.0.0.1:4444'
            host: '127.0.0.1'
            port: 4444
            browser: firefox
            wait: 5
            connection_timeout: 30
            request_timeout: 30
            capabilities:
                browserName: firefox

If your Selenium version manages GeckoDriver itself, Selenium still needs to be able to start Firefox on the machine. A working driver executable cannot compensate for a browser that is absent or unusable.

Fix “driver executable not found” and PATH errors

Download the driver release that matches the browser generation, then either put the executable in a directory on the Windows PATH, configure an explicit driver-service path in the process that launches it, or let Selenium Manager resolve it when your Selenium version supports that feature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open a new Command Prompt after changing PATH; existing consoles retain the old environment.
  2. Verify discovery with chromedriver.exe --version or geckodriver.exe --version.
  3. Record the version output and compare it with the browser version shown in the browser’s Help/About screen.
  4. Run Codeception from the same account and environment that will execute the tests. A driver visible to an administrator may not be visible to a service account.

Selenium documentation states that Selenium 4.6 can download the correct driver through Selenium Manager. That solves driver discovery, not an unsupported browser, a blocked download, or a stopped endpoint. Windows 7 can also prevent upgrading Selenium, the browser, and PHP together, so keep a reproducible local driver package when automatic management is impractical.

Fix “session not created” and browser-version mismatch

“Session not created” is usually a compatibility error. Capture both version numbers before replacing anything. Do not install the newest driver blindly on Windows 7.

Chrome and Edge limits on Windows 7

Google identifies Chrome 109 as the last Chrome release supporting Windows 7. Microsoft identifies Edge 109 as the last Edge version supporting Windows 7 and says support for the operating system has ended. A current ChromeDriver or Edge driver may therefore reject the old browser, while an old driver may reject a newer browser copied from another machine.

Choose a browser-driver pair from the same supported generation, install that browser intentionally, and pin the driver used by the test job. If a project depends on Chrome or Edge newer than 109, the correct fix is to move execution to a supported operating system or remote grid rather than forcing an incompatible binary onto Windows 7.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Firefox and GeckoDriver

Mozilla directs Windows 7 users to Firefox 115 ESR. Confirm that the selected GeckoDriver release supports the exact Firefox build you installed; Firefox and GeckoDriver compatibility is version-dependent. Keep the pair together in the test image and document the versions so another update does not silently break session creation.

Fix connection refused, endpoint, and timeout errors

  1. Start the process first. Launch Selenium Server, ChromeDriver, or GeckoDriver in a separate console before running codecept run.
  2. Match the endpoint. Compare url, host, port, and any configured path with the process you started. The default local Selenium address is commonly 127.0.0.1:4444; Codeception’s direct ChromeDriver example commonly uses 9515.
  3. Check local security software. Windows Firewall or antivirus software can block the listening port or the browser child process. Permit the approved executable and port, then retry.
  4. Test locally before tuning delays. A longer timeout cannot repair a stopped process or wrong port.
  5. Increase timeouts only for a confirmed slow endpoint. Codeception documents connection_timeout and request_timeout as 30 seconds by default. Raise them deliberately for a slow remote grid or overloaded machine.

If the error changes from “connection refused” to a browser startup error after the endpoint is corrected, transport is fixed and you should return to browser-driver compatibility.

Fix ElementNotFound, stale elements, and flaky clicks

Selenium identifies poor synchronization as its most common error source. Treat an element failure as a state problem first:

Rank #4
DELL OptiPlex 7010 MT Desktop PC, Intel Core i7-3770 3.4GHz, 8GB DDR3 RAM, 256GB SSD, Win-7 Pro x64 (Renewed)
  • This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high performance bar may offer Certified Refurbished products on Amazon.com
  • Intel Core i7-3770 3.40GHz Processor
  • 8GB DDR3 Memory
  • 256GB Solid State Drive
  • Windows 7 Professional x64
  • Wait for the specific state required by the next action: visible, enabled, clickable, or carrying the expected attribute.
  • Use Codeception’s wait for a sensible baseline, but do not raise it globally to hide a broken locator or a page that never finishes loading.
  • Prefer strict locators such as ['id' => 'login'] or a precise CSS/XPath selector. Avoid fuzzy text matches when several controls have similar labels.
  • After navigation or an AJAX update, locate the element again instead of reusing a stale element reference.
  • For a page with a predictable transition, wait for the transition’s stable result, such as a dashboard selector, rather than sleeping for an arbitrary number of seconds.

A useful distinction is timing versus reachability: if the browser never opens the page, fix the driver or endpoint; if the page opens but the control appears later, fix the locator and synchronization.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Collect diagnostics that identify the real layer

Set debug_log_entries to a value above zero in the WebDriver configuration and enable JavaScript error logging when client-side failures matter. Re-run only the failing test with step output and preserve:

  • the complete Selenium or driver exception, including the first “caused by” line;
  • browser and driver --version output (or the browser’s About version);
  • the WebDriver URL, host, port, and path;
  • the exact first failing Codeception step and locator;
  • whether the failure occurs on a clean first run or only after several tests.

This evidence separates a transport failure, a browser process failure, and a test synchronization failure. Changing all three categories at once makes the next error harder to interpret.

Choose local Selenium, direct driver, or a remote grid

Option Version control Private-site access Maintenance and debugging Latency and cost
Local Selenium You control Selenium, browser, and driver versions. Direct access to sites on the Windows 7 network. One extra server process; local logs are available. Usually low latency; service cost not stated.
Direct ChromeDriver/GeckoDriver You control the browser-driver pair directly. Direct local access. Fewer moving parts, but you must launch and monitor the driver. Usually low latency; service cost not stated.
Hosted grid Provider supplies selectable browser and operating-system combinations. Private sites require the provider’s local-tunnel mechanism. Remote logs and, depending on the service, video or session artifacts; account and network setup are required. Network latency applies; current commercial pricing is not stated here.

Codeception documents remote WebDriver configurations for BrowserStack and LambdaTest, including host credentials, browser capabilities, operating-system and version settings, and local tunnels. Use a supported runner operating system when possible; a hosted grid is particularly useful when the required browser no longer runs on Windows 7.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Windows 7 reality check and migration plan

Windows 7 support has ended. The Chrome 109 and Edge 109 ceilings and Firefox 115 ESR guidance describe what a legacy machine can realistically run, not a current secure browser stack. You may stabilize a frozen test matrix for maintenance work, but do not interpret a passing legacy run as proof that the environment is current or secure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Freeze the browser, driver, Selenium, PHP, and Codeception versions that are known to work.
  2. Store the exact executables and configuration with the project or build image.
  3. Run the same suite on a supported Windows or Linux runner as a migration target.
  4. If the application is private, select a grid that supports a local tunnel and verify that the tunnel can reach the test environment.
  5. Move the scheduled job off Windows 7 once the supported runner passes the same acceptance suite.

Or skip the browser setup

If your goal is a clean page image or PDF rather than interactive browser assertions, ScreenshotNeo can take the capture with one HTTP request. Its API accepts the consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and whether the request was billed.

Use the documented endpoint and parameters at ScreenshotNeo’s API documentation:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

You can still control full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or a custom viewport, retina scale, PDF paper size and page ranges, custom CSS and JavaScript, clicks, selector waits, delays or network-idle waits, hidden selectors, blocked ads or resource types, headers, cookies, user agent, authorization, timezone, geolocation, transparent backgrounds, resizing, cache TTL, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and OpenAPI support. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The service has a free allowance of 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try the capture without setting up Selenium.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Will Selenium Manager fix a browser-driver version mismatch?

No. Selenium Manager helps locate or download a driver in Selenium 4.6 and later; it does not make an unsupported browser and driver pair compatible. On Windows 7, select a matching legacy pair or move the run to a supported environment.

Can I run Codeception without Selenium Server?

Yes. Codeception’s WebDriver module can connect directly to a ChromeDriver or GeckoDriver endpoint. Start that driver separately and set the module URL, host, and port to the endpoint it actually exposes.

What should I preserve when a legacy test finally passes?

Record the browser, driver, Selenium, PHP, and Codeception versions, keep the working executables, and retain the suite configuration. This prevents an automatic update from recreating the failure.

Quick Recap

Bestseller No. 1
Dell OptiPlex 9020 Desktop Computer - Intel Core i5 (4th Gen) i5-4590 3.30 GHz - 8 GB DDR3 SDRAM - 500 GB HDD - Windows 7
Dell OptiPlex 9020 Desktop Computer - Intel Core i5 (4th Gen) i5-4590 3.30 GHz - 8 GB DDR3 SDRAM - 500 GB HDD - Windows 7
Processor Model: i5-4590; Standard Memory: 8GB; Total Hard Drive Capacity: 500GB; Operating System: Windows 7
$117.27
Bestseller No. 2
Dell OptiPlex 990 DT/Core i7-2600 Quad @ 3.40 GHz/12GB DDR3/1TB HDD/DVD-RW/Windows 7 PRO 64 BIT
Dell OptiPlex 990 DT/Core i7-2600 Quad @ 3.40 GHz/12GB DDR3/1TB HDD/DVD-RW/Windows 7 PRO 64 BIT
Microsoft Authorized Refurbisher; Windows 7 Professional 64bit; PACKAGE DOES NOT include monitor or keyboard/mouse
$570.65
Bestseller No. 4
DELL OptiPlex 7010 MT Desktop PC, Intel Core i7-3770 3.4GHz, 8GB DDR3 RAM, 256GB SSD, Win-7 Pro x64 (Renewed)
DELL OptiPlex 7010 MT Desktop PC, Intel Core i7-3770 3.4GHz, 8GB DDR3 RAM, 256GB SSD, Win-7 Pro x64 (Renewed)
Intel Core i7-3770 3.40GHz Processor; 8GB DDR3 Memory; 256GB Solid State Drive; Windows 7 Professional x64
$219.99

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.