Mink is an open source acceptance test framework for web applications, written in PHP 5.3.
Questions tagged [mink]
460 questions
6
votes
2 answers
How to handle browser window or tab using Behat and Mink PHP
I have test that click on link and then new browser window open and in new browser window I need to check some elements are present. How to switch to new Browser window that was opened using BEHAT/MINK?

Ihor Bovkit
- 120
- 3
- 9
6
votes
1 answer
Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)
i'm trying to use mink with Behat on Zend framework 1 but when i run Behat command i get this error "Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)"
here's my composer:
"behat/behat":…

ahmed reda
- 153
- 2
- 5
6
votes
3 answers
Struggling to install mink and behat using composer for use with symfony2
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 …

Paul Saunders
- 278
- 2
- 10
6
votes
4 answers
How do I tell Behat / Mink to hover over an element on a webpage?
I am new to Behat. I am currently using the Mink Extension and the Selenium2 driver and I would like to know how to specify that the test should hover over an element as part of the Scenario.
For example, here is my scenario:
Scenario: Testing that…

Peter Meth
- 405
- 5
- 12
6
votes
2 answers
How can i specify an order in mink/behat tests?
I'm using mink/behat to test my website.
I need certain features be executed before others.
Is there a way to specify an order of execution?
For example:
There are 3 features: Administration, Login, Buy
I need to execute them in this order: Login,…

Bernd Strehl
- 2,852
- 4
- 24
- 43
6
votes
4 answers
Can I make Behat/ZombieJS/Mink simulate a click on a "non-link" element, to fire JS listeners?
I am using Behat for testing, with the ZombieJS driver, and everything is working very well so far, but there is one thing that bothers me, I can't seem to figure out how to get Behat to simulate a click on a non-link element. I guess this comes…

K. Norbert
- 10,494
- 5
- 49
- 48
5
votes
0 answers
Selenium + Mink + Chrome: "Could not open connection" error
I'm not new to setting up Selenium and Mink, but it always seems to be a hassle. This time I'm trying to get it set up in an ubuntu docker container and I am running into the following error:
Could not open connection: Unable to create new…

hacklan07
- 308
- 4
- 10
5
votes
1 answer
Behat + selenium 2 wait for page to load
Is there a way to reliably wait for pages to load when using Behat with Mink using the Selenium2Driver?
I've inherited some legacy tests that wait like this:
Background:
Given I am on "http://test.example.com"
And I wait for "20000"
Given I…

Danack
- 24,939
- 16
- 90
- 122
5
votes
2 answers
Authentification with HTTP cookie in Selenium using Behat
I would like to create a behat definition to authenticate a user using a cookie.
It works with the Behat BrowserKitDriver, when there is no @javascript tag on the behat scenario.
But it did not work with the Behat Selenium2Driver, when there is the…

mykiwi
- 1,671
- 1
- 19
- 35
5
votes
2 answers
Semantical Error happens when using Behat only
Hello StackOverflow community, I just joined the community and this is my first question :)
I'm using Symfony2. When I access a page manually using my browser (firefox):
http://localhost:8000/vendor/add-product
The page renders fine and I see a…

Rave Alroone
- 71
- 5
5
votes
3 answers
Composer: Cannot install behat and mink in laravel 5.2 new project
I want to learn BDD using behat in a laravel project but I come accross dependencies problems with composer (this may be a very basic question but I have very little experience in composer so that I don't know what to do).
I create a new…

Iam Zesh
- 1,797
- 2
- 20
- 42
5
votes
1 answer
Could not evaluate XPath (Behat/Mink)
I'm using the following function:
/**
* Click on the element with the provided xpath query
*
* @When /^I click on the element with xpath "([^"]*)"$/
*/
public function iClickOnTheElementWithXPath($xpath)
{
$session =…

Ginz Its
- 51
- 1
- 3
5
votes
2 answers
How to handle confirm popup with phantomjs + behat + mink
In my tests I use this step to confirm a javascript confirm popup:
/**
* @when /^(?:|I )confirm the popup$/
*/
public function confirmPopup()
{
$this->getSession()->getDriver()->getWebDriverSession()->accept_alert();
}
This step work fine…

Benjamin Lazarecki
- 2,950
- 1
- 20
- 27
5
votes
4 answers
How to switch to dynamically named iframe with Behat/Mink
Writing test for an iFrame generated when a button is clicked. The iFrame name and id are similar but generated dynamically. I have used "switchToiFrame" successfully before.

Ian Jenkins
- 109
- 2
- 8
5
votes
2 answers
Mink: wait for page to load in @BeforeStep
I want to execute some javascript on page in @BeforeStep hook that depends on jQuery. However jQuery is not defined at that time, in fact page is blank.
Here's what I am trying to achive:
/**
* @BeforeStep @javascript
*/
public function…

Dziamid
- 11,225
- 12
- 69
- 104