Hello, I am trying to automate behat test via Gitlab CI. Issue I've got is that in CI and in PHPStorm (executing same tests) I always get
WebDriver\Exception\NoSuchElement: Element not found with xpath, //html . From stack trace, I am not able to find anything. When I try to run locally (docker) via terminal test passes and everything works, but if I try to run then through PHPStorm I get the same error as in CI. I can't figure out what is wrong, it looks like selenium2 is not working correctly. And screenshots generated by test (when using PHPStorm and CI) are 0 byte.
My behat.yml file looks like:
default: suites: default: path: '%paths.base%/features' contexts: - App\Tests\Behat\FeatureContext - Behat\MinkExtension\Context\MinkContext extensions: FriendsOfBehat\SymfonyExtension: bootstrap: tests/bootstrap.php kernel: environment: test local_ff: extensions: FriendsOfBehat\SymfonyExtension: bootstrap: tests/bootstrap.php kernel: environment: test Behat\MinkExtension: base_url: http://behattest.test browser_name: firefox sessions: firefox: selenium2: wd_host: "http://selenium-hub:4444/wd/hub" browser: firefox capabilities: browser: firefox
When running in local terminal (docker) and using local_ff profile it works as expected
New to behat. I've created a feature file, and when I run
php behat.phar --init I get a block of html telling me I've been redirected to githubusercontent.com. I load the url in a browser telling me I've got a bunch of Amz headers missing. Why is it redirecting to githubusercontent? And can I prevent that from happening?
I'm working on a free tier lightsail aws instance if that makes any difference
composer require behat/behatand then
vendor/bin/behat --initand this will show you what you should see... maybe it is the way you installed or are calling the behat "bin" (which is a phar)