Codeception (Chromedriver) tests possible?

Is it possible to run Codeception tests that use Chromedriver (or Selenium, or PhantomJS) on a site running in Local? I’m able to run WPBrowser (an extension of PHPBrowser) based tests be executing them inside the container, but doing the same thing for tests using Chromedriver doesn’t work – I’m guessing because Chromedriver is running on my host machine, while the tests are executed in the Local machine.

For reference, here’s the error message I get when I try to run them:

[ConnectionException] Can’t connect to Webdriver at Please make sure that Selenium Server or PhantomJS is running.

Hi @tnorthcutt,

Sorry about this! Codeception can be tricky to set up when containers are involved.

Based off of the details, it sounds like you need to look for Webdriver/Selenium at the IP that loopbacks to your Mac/PC instead of which will loopback to the container if used inside the container. Here’s how you can get the host machine’s IP: IP of HOST available within site container?

Thanks, @clay! That worked perfectly.

For anyone else who runs across this, here’s what I ended up with:

Relevant portion of my acceptance.suite.yml file:

            url: '%TEST_SITE_WP_URL%'
            host: ''
            browser: chrome
            port: 9515
            window_size: 1024x768
            adminUsername: '%TEST_SITE_ADMIN_USERNAME%'
            adminPassword: '%TEST_SITE_ADMIN_PASSWORD%'
            adminPath: '/wp-admin' is what I got by running the command @clay pointed to: "/Applications/Local by" ssh local-by-flywheel "route | grep default" | awk '{ print $2 }'

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.