These are chat archives for Behat/Behat

17th
Oct 2017
gvanduijn
@gvanduijn
Oct 17 2017 11:52
Is there somebody here?
Timo
@Swamp3
Oct 17 2017 12:43
Hey @gvanduijn , ive got it working. In my behat.yml i created a session for browserstack that contains the login credentials and the desired browser capabilities. then you can just use it in your suite's session config like : mink_javascript_session: browserstack
gvanduijn
@gvanduijn
Oct 17 2017 12:47
@Swamp3 hi thanks! I'm now busy with making an custom yaml file but everytime I got an error message...
Timo
@Swamp3
Oct 17 2017 12:49
@gvanduijn you can find a small snipped similar to my config here : https://gitlab.com/snippets/1679903 maybe this will help you
gvanduijn
@gvanduijn
Oct 17 2017 12:51
@Swamp3 my context file is located here
blob
Everytime I got the message like this:
[Behat\Behat\Context\Exception\ContextNotFoundException]
FeatureContext context class not found and can not be used.
Christophe Coevoet
@stof
Oct 17 2017 14:11
what is the content of your file ?
gvanduijn
@gvanduijn
Oct 17 2017 14:16
@stof i started again from skratch with the config .So this is what I have at the moment:
default:
extensions:
Behat\MinkExtension:
base_url: url
sessions:
chrome_mac:
selenium2:
browser: firefox
Christophe Coevoet
@stof
Oct 17 2017 14:21
the FeatureContext.php file
gvanduijn
@gvanduijn
Oct 17 2017 14:22

"<?php

use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext;

/**

  • Defines application features from the specific context.
    /
    class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext
    {
    /*
    • Initializes context.
      *
    • Every scenario gets its own context instance.
    • You can also pass arbitrary arguments to the
    • context constructor through behat.yml.
      */
      public function __construct()
      {
      }

}"

Some specific function are in these files
Christophe Coevoet
@stof
Oct 17 2017 14:24
well, to you have the autoload-dev rule in your composer.json to autoload the classes in the features/bootstrap folder ?
gvanduijn
@gvanduijn
Oct 17 2017 14:25
Not that I see, only require and config bin-dir
Something like this in composer.json?
"autoload-dev" : {
"psr-4": {
"Tests\": "features/bootstrap"
}
}