Questions tagged [mink]

Mink is an open source acceptance test framework for web applications, written in PHP 5.3.

463 questions
32
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,376
  • 1
  • 14
  • 17
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
  • 6
  • 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
  • 3
  • 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,169
  • 3
  • 26
  • 47
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
  • 7,659
  • 1
  • 15
  • 23
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
  • 7,953
  • 2
  • 25
  • 51
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,257
  • 2
  • 24
  • 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
  • 541
  • 4
  • 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
  • 5,761
  • 4
  • 24
  • 42
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,162
  • 3
  • 14
  • 30
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
  • 6,187
  • 2
  • 40
  • 80
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
  • 744
  • 1
  • 9
  • 28
6
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,572
  • 1
  • 15
  • 32
1
2 3
30 31