DEV Community

Lee Jones
Lee Jones

Posted on

1

Configuring Selenium in Codeception on OSX

Installing Selenium

This turns out to be a really simple task using brew.

    brew install selenium-server-standalone

Installing Chromedriver

    brew tap homebrew/cask
    brew cask install chromedriver

Configuring Codeception

Tho old acceptance.suite.yml:

    actor: AcceptanceTester
    modules:
        enabled:
            - PhpBrowser:
            url: http://devsite.local
            - \Helper\Acceptance

Updated to use selenium:

    actor: AcceptanceTester
    modules:
        enabled:
            - WebDriver:
                url: http://devsite.local
                browser: chrome
            - \Helper\Acceptance

Running Tests

First, fire up selenium:

    selenium-server -port 4444

Then run your tests (assuming composer install):

    vendor/bin/codecept run

At this point you should see the browser pop up and start responding to invisible fingers.

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay