Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Module Webdriver Laravel Package

codeception/module-webdriver

WebDriver module for Codeception that drives real browsers (via Selenium/ChromeDriver/etc.) for end-to-end acceptance testing. Provides browser control, navigation, form interactions, assertions, waits, and screenshots for UI automation.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by installing the module via Composer: composer require --dev codeception/module-webdriver. Then enable it in your acceptance.suite.yml (or appropriate suite config), specifying the WebDriver connection (e.g., using Selenium, ChromeDriver, or BrowserStack). Configure the url and browser (e.g., chrome, firefox) under the module settings. Your first test can be a simple navigation and assertion: $I->amOnPage('/'); $I->see('Welcome');. Check the Codeception WebDriver docs for full configuration examples.

Implementation Patterns

Use WebDriver in acceptance tests to simulate real user interactions—clicking buttons, filling forms, handling sessions, or testing JavaScript-heavy SPAs. Leverage helper methods like $I->waitForElement(), $I->switchToIFrame(), and $I->wait() for dynamic content. Integrate with CI/CD by headlessly launching browsers (e.g., via chromeOptions: ['args' => ['--headless']]). Chain actions for complex workflows:
$I->click('.login-btn'); $I->fillField('email', '[email protected]'); $I->submitForm('#login-form');.
Combine with Db and REST modules to validate full-stack behavior (e.g., test UI → DB → API integration). Use waitForText() and waitUntil for reliable async assertions.

Gotchas and Tips

⚠️ Ensure the WebDriver server (e.g., Selenium, ChromeDriver) is running before tests start—common failure point. Set restart: false in config only if manually managing browser state; otherwise, tests may retain sessions across cases. Beware of race conditions: avoid sleep(); use explicit waits (waitForElementVisible) instead. The amOnPage() method resets the browser context; use amOnUrl() for absolute URLs without base URL trimming. For CI environments, use Docker images (e.g., selenium/standalone-chrome) and link via host/port config. To debug, set debug option to 'true'—screenshots and logs will be saved on failure. If switching frames/windows, call $I->switchToWindow() before assertions, or they’ll target the wrong context.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle