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', 'user@example.com'); $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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4