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 http://127.0.0.1:9515/wd/hub. Please make sure that Selenium Server or PhantomJS is running.
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 127.0.0.1 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?
10.0.2.2 is what I got by running the command @clay pointed to: "/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" ssh local-by-flywheel "route | grep default" | awk '{ print $2 }'