Questions tagged [mink]

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

460 questions
0
votes
1 answer

Configure Mink/Behat base_url in @BeforeSuite

To avoid port clashes, I am starting a web server in @BeforeSuite event on an available port. note: To find an available port: $socket = stream_socket_server("tcp://$host:0"); $address = stream_socket_get_name($socket, false); …
Mathieu
  • 5,495
  • 2
  • 31
  • 48
0
votes
1 answer

Behat - Implement Step definitions

I am having difficulties in setting Behat framework correctly. The test runs fine, however the step definitions are not being picked up from the FeatureContext file. Have tried out answers from other questions with no luck. The behat.yml file is…
Tommy02
  • 41
  • 1
  • 5
0
votes
1 answer

Accept browser permission dialog with behat/mink

I'm using Behat with Mink. Currently I'm working on building a test for webrtc. The issue is that webrtc has a browser permission dialog where the user has to select that they do want to share their media. As this permission is from the browser…
Ryan C
  • 1,003
  • 1
  • 14
  • 26
0
votes
1 answer

Multiple elements on website

i use Behat with Mink and Selenium 2. The Problem is that i have a element twice... "Settings". First element is (for example) Settings and the second thing is a quick link in non visible menu
PatrickB
  • 3,225
  • 5
  • 31
  • 55
0
votes
1 answer

Reverse regex for mink "the url should match"

how can i reverse a query like this. the url should match ".*window\.open.*" I would have a scenario like... the url should not match ".*window\.open.*" How can i reverse the regexp? Tried something like…
PatrickB
  • 3,225
  • 5
  • 31
  • 55
0
votes
1 answer

behat.yml in app/config instead of root directory

I installed behat with mink and selenium2-driver for my Symfony2 project. Is it possible to use the /app/config/behat.yml instead of the /behat.yml file? I searched on google but I can't find anything else this command. php bin/behat --config…
PatrickB
  • 3,225
  • 5
  • 31
  • 55
0
votes
1 answer

How to assert that a text only exists 1 time in Mink

Im currently working on a small project and i decided to play around with Behat/Mink a little and i came across my first problem i can not solve alone. I have this feature and it is working as expected Scenario: Create Customer Given I am on…
CBergau
  • 636
  • 2
  • 10
  • 26
0
votes
2 answers

Behat/Mink is it possible to do a find through an incomplete string?

I've been working in BDD through Behat|Mink. However I'm failing in finding an input (field) with an ID or Name if they aren't complete. I intended to do something like: $field = $this->getSession()->getPage()->findField( "*first_name*" ); where…
mloureiro
  • 957
  • 1
  • 12
  • 34
0
votes
1 answer

behat fails with javascript but succeeds without

I'm writing acceptance tests for my php application using Behat/Mink and found out a strange thing: Behat can not find an input field when javascript is on, while it finds the same field when javascript is off. To be precise: the following scenario…
Andrew
  • 2,148
  • 5
  • 23
  • 34
0
votes
1 answer

behat Selenium2Driver "could not open connection"

i'm am trying tu use Behat + Mink + Selenium2Driver into Symfony2. i ran Selenium Server. my behat.yml is: default: extensions: Behat\Symfony2Extension\Extension: mink_driver: true …
nitche
  • 121
  • 3
  • 13
0
votes
1 answer

Different action based on which mink driver is running

I'm using Behat with Mink. I would like one of my step definitions to act differently depending on which driver is running. Ideally, my code would look something like this public function stepDefinition(){ …
Nathan Edwards
  • 311
  • 1
  • 3
  • 17
0
votes
1 answer

How to disable reset session between scenarios in Behat Mink?

-- edit -- We have in the company website for statistics from Facebook. Login to statistics page is using Facebook account. I have written BDD tests. Tests log into the site and test their functionality. But Facebook does not allow frequent logging…
Lawondyss
  • 95
  • 6
0
votes
1 answer

How to override NamedSelector class from Mink?

I have a symfony 2 project however I have some issue while creating my scenario because tooltip plugin renames title to oldtile, How can I override NamedSelector class from Mink to change some xpath selectors? I need to add "contains(./@oldtitle,…
dextervip
  • 4,999
  • 16
  • 65
  • 93
0
votes
1 answer

How to find a symfony 2 field in Behat/Mink

I have the following input field generated by symfony: And I am writing my scenario like…
dextervip
  • 4,999
  • 16
  • 65
  • 93
0
votes
1 answer

Using Mink and Sahi, how do i use another browser besides FF?

Whenever I run Sahi, it is using Firefox by default. What I am trying to do is have more control over the browser I use. I have followed instructions from http://mink.behat.org/#sahidriver and my behat.yml is : default: formatter: name:…
milof
  • 696
  • 9
  • 25