php - Behat + Mink extension + Selenium foreach problems -


i followed instruction doc http://docs.behat.org/en/v2.5/cookbook/behat_and_mink.html , seem everytime try test scenario javascript weird error

warning: invalid argument supplied foreach() in vendor/behat/mink-selenium2-driver/src/selenium2driver.php line 444

my behat.yml

default:     gherkin:         cache: var/cache/test/behat/behat_gherkin_cache     testers:         rerun_cache: var/cache/test/behat/behat_rerun_cache     extensions:         behat\symfony2extension: ~         behat\webapiextension:             base_url: 'http://nginx:8001'         behat\minkextension:             base_url: 'http://localhost:8000'             selenium2: ~             sessions:                 default:                     symfony2: ~     suites:         default:             paths: [ '%paths.base%/features/app' ]             contexts:                 - featureappcontext                 - knp\friendlycontexts\context\tablecontext 

and scenario is

@javascript scenario: domain name reserve   given on "/login"   when fill in following:     | username | user_default |     | password | test |   press "connexion"   should on "/" 

but fail @ first rules error mentioned above.

the selenium2 jar running too.

i don't know why error

here problematic method seleniumdriver.php

/**  * {@inheritdoc}  */ public function getcookie($name) {     $cookies = $this->wdsession->getallcookies();     foreach ($cookies $cookie) {         if ($cookie['name'] === $name) {             return urldecode($cookie['value']);         }     } } 

do have ideas ?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -