mink

How to change codeception phpbrowser/mink timeout

核能气质少年 提交于 2019-12-05 20:39:14
I'm trying to create test with codeception that will check's the page is properly working in case of high load. Unfortunately if the page is in very very high load and the tests starts I got such error: [..] [Codeception\Exception\ModuleConfig] Codeception\Util\Mink module is not configured! Provided URL can't be accessed by this driver.[curl] 28: Operation timed out after 30031 milliseconds with 0 out of -1 bytes received [url] http://xxxx.xxx/app_db2.php [..] Is there any possibility to set the Mink timeout to some higher value ? You can set curl options via your test suit configuration just

Behat “base_url” from command line

大兔子大兔子 提交于 2019-12-04 18:19:33
问题 I would like to know if it's possible to set the base_url via the command line. Example bin/behat --base_url=http://google.fr I would like to avoid creating a new profile and passing it via the command line each time I have to test a new url, for flexibility purpose. Is there any trick here to do this ? Thank you. 回答1: I found the solution by myself. Just pass the base_url in the BEHAT_PARAM environment variable. export BEHAT_PARAMS="context[parameters][base_url]=http://google.fr" Then run

Struggling to install mink and behat using composer for use with symfony2

给你一囗甜甜゛ 提交于 2019-12-04 05:25:12
I'm trying to install behat and mink with symfony 2.4 using composer but I can't seem to get my composer.json file to an resolve to an installable set of packages. I installed symfony2 using the command on http://symfony.com/doc/current/book/installation.html php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.4.* Below is my require section of my composer.json file: "require": { "php": ">=5.3.3", "symfony/symfony": "~2.4", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": "~1.2", "twig/extensions": "~1.0", "symfony/assetic-bundle": "~2.3",

How to test file download in Behat

帅比萌擦擦* 提交于 2019-12-04 03:24:43
问题 There is this new Export functionality developed on this application and I'm trying to test it using Behat/Mink. The issue here is when I click on the export link, the data on the page gets exported in to a CSV and gets saved under /Downloads but I don't see any response code or anything on the page. Is there a way I can export the CSV and navigate to the /Downloads folder to verify the file? 回答1: Assuming you are using the Selenium driver you could "click" on the link and $this->getSession()

Mink doesn't work with behat 3.0.12

杀马特。学长 韩版系。学妹 提交于 2019-12-03 08:25:41
问题 I installed Behat, Mink and a few other related packages. Here is my composer.json file: "require":{ //... "behat/behat": "~3.0.6", "behat/symfony2-extension": "dev-master", "behat/mink": "dev-master", "behat/mink-browserkit-driver": "dev-master", "behat/mink-goutte-driver": "dev-master", "behat/mink-selenium2-driver": "dev-master", "phpunit/php-code-coverage": "dev-master", "phpunit/phpunit-mock-objects": "dev-master", "phpunit/phpunit": "dev-master" } And here is my behat.yml file: default:

Symfony2 Extension - Behat Mink

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I installed a Symfony2 extension for Behat Mink from here When I run test, an error occurs [ReflectionException] Class AppKernel does not exist. What am I doing wrong? behat.yml default : extensions : Behat \MinkExtension\Extension : base_url : http : //localhost/behat goutte : ~ selenium2 : ~ Behat \Symfony2Extension\Extension : ~ 回答1: First run these commands to install the dependencies: composer require behat / behat composer require behat / symfony2 - extension composer require behat / mink composer require behat / mink -

Mink doesn't work with behat 3.0.12

三世轮回 提交于 2019-12-02 22:08:45
I installed Behat, Mink and a few other related packages. Here is my composer.json file: "require":{ //... "behat/behat": "~3.0.6", "behat/symfony2-extension": "dev-master", "behat/mink": "dev-master", "behat/mink-browserkit-driver": "dev-master", "behat/mink-goutte-driver": "dev-master", "behat/mink-selenium2-driver": "dev-master", "phpunit/php-code-coverage": "dev-master", "phpunit/phpunit-mock-objects": "dev-master", "phpunit/phpunit": "dev-master" } And here is my behat.yml file: default: extensions: Behat\Symfony2Extension: mink_driver: true kernel: env: test debug: true Behat

How would I make a fake signature with behat

为君一笑 提交于 2019-12-02 20:23:13
问题 Picture of tested code / Picture of working signature Hello I am using behat with the selenium driver integrated with mink and I am trying to write a test that inputs a fake signature. We use the mouse to draw the signature on the screen so I want to be able to have selenium do that for me. I tried grabbing the Id of the field and using dragTo('another element on my page'), but it only clicks inside the signature box and doesnt do anything else. The framework I am using is laravel for php.

Symfony2 Extension - Behat Mink

邮差的信 提交于 2019-12-02 11:12:24
问题 I installed a Symfony2 extension for Behat Mink from here When I run test, an error occurs [ReflectionException] Class AppKernel does not exist. What am I doing wrong? behat.yml default: extensions: Behat\MinkExtension\Extension: base_url: http://localhost/behat goutte: ~ selenium2: ~ Behat\Symfony2Extension\Extension: ~ 回答1: First run these commands to install the dependencies: composer require behat/behat composer require behat/symfony2-extension composer require behat/mink composer require

sahi and symfony2

眉间皱痕 提交于 2019-12-02 09:42:18
i would like to test behat, mink and sahi with symfony2 so, in my config_test.yml i have mink: base_url: http://localhost/Symfony_Standard_2.0.15_2/symfony/web/app_test.php default_session: symfony sahi: ~ and in test.feature @mink:sahi Scenario: Open page with products list and check it Given I am on "/hello" Then the response should contain "hello" when i execute i have this PHP Fatal error: Call to undefined function Buzz\Client\curl_init() in C:\wamp\ www\Symfony_Standard_2.0.15_2\Symfony\vendor\buzz\lib\Buzz\Client\AbstractCurl.p hp on line 26 help me please, It seems that you do not have