Mink is an open source acceptance test framework for web applications, written in PHP 5.3.
Questions tagged [mink]
460 questions
34
votes
3 answers
PHPUnit & Behat; complementing or alternatives?
I have been looking around SO and Google, but I couldn't really get a definitive answer.
PHPUnit is a framework for unittesting, like JUnit. I use it, also in combination with the Selenium-extension for functional testing. When browsing around I see…

qrazi
- 1,406
- 1
- 15
- 18
31
votes
1 answer
Behat & Mink : Use the test environment
I'm current using Behat with Mink & Goutte Driver. When i'm trying to use it with my dev environment, via the app_dev.php file, which is a typical app_dev.php file from a Symfony2 Standard Edition, my tests are working just fine (Gists).
But, if I…

Talus
- 754
- 7
- 18
24
votes
1 answer
Mink doesn't work with behat 3.0.12
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",
…

cute.S
- 361
- 4
- 17
11
votes
1 answer
how to activate mink in behat
I'm trying to use behat and mink together, reading that link:
http://docs.behat.org/cookbook/behat_and_mink.html#method-1-composer
and trying to activate Mink in Behat framework, but it does not work for me :(
here is text form manual
And this…

user1016265
- 2,307
- 3
- 32
- 49
10
votes
4 answers
Behat "base_url" from command line
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…

lnki
- 411
- 1
- 4
- 9
9
votes
1 answer
Testing drag and drop with behat and mink
I'm trying to emulate drag and drop UI behaviour in a behat test. So far with no success, despite mink allegedly supporting that interaction.
Weirdly enough it was hard for me to find any relevant blog posts about the subjects. Ones I've found (this…

guessimtoolate
- 8,372
- 2
- 18
- 26
9
votes
3 answers
Can I send raw keyboard input using Mink and Selenium2?
I am using Behat and Mink with the Selenium2 driver, and I'm trying to type directly into a form field (simulating raw keyboard input), instead of using the fillField() function.
This is what I'm trying:
$element =…

jcsanyi
- 8,133
- 2
- 29
- 52
9
votes
2 answers
Struggling to get Mink working with Behat
I've been following this guide (and installed everything through composer): http://docs.behat.org/cookbook/behat_and_mink.html and am attempting to get Behat + Mink working but everytime I try and run bin/behat I get the following error:
PHP Fatal…

pogo
- 2,287
- 2
- 25
- 36
8
votes
1 answer
Make CSS Selector (first-child) work in Behat 3 with Sahi Driver
I was just wondering if you could point out where the problem is here, if it's Behat, the CSS selector, or the Sahi Driver.
We have just upgraded to Behat 3 and are using Sahi Driver (most recent open source version). We have found that any Behat…

sugarwaffle
- 551
- 1
- 5
- 13
7
votes
2 answers
How can i click a span in Behat?
I am using Behat to test an third-party webshop. I have a item in the shoppingcart that i want to delete. A confirmation pop-up shows that asks me if i really want to do it. The structure of this dialog looks as following:

Robbin Voortman
- 133
- 1
- 1
- 6
7
votes
1 answer
How to test a REST API with Behat and Mink in Symfony 2
I'm builing a REST API in Symfony and I'd like to test it with Behat (using Mink and the behat extension for symfony2). There's no problem for the GET methods, I just "mock" some database objects, use the "I am on " step definition and check the…

petekaner
- 8,071
- 5
- 29
- 52
7
votes
4 answers
How to test file download in Behat
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…

vijay pujar
- 1,683
- 4
- 19
- 32
7
votes
6 answers
How to verify the selected option from the dropdown using Behat/Mink
There are couple of filters on the page and I would like to verify the default filter values.
I'm not able to get the selectors working.
Can someone help.
Here is the code snippet:
7
votes
2 answers
Can't upload a file with Sahi / Mink / Behat in a Symfony2 application
I am using Mink and Sahi for my user interface tests inside a Symfony2 application. But actually I can't manage to upload a file with Sahi.
My Sahi server is up and running:
[09:51:33] coil@ubuntu:~/Webdev/sahi/bin$ ./sahi.sh
--------
SAHI_HOME:…

COil
- 7,201
- 2
- 50
- 98
7
votes
1 answer
How to test with behat two sites in the same test with different environments (so different URLs)
I'm using Behat and Mink to test several sites. Two of them use Single Sign On, so one of my test includes login in one site, go to second site and check I'm logged in.
This is acomplished with this behat code:
Feature: SSO
In order to login in…

sanzante
- 844
- 1
- 11
- 28