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

Behat / Mink - session being lost part way through scenario

I have a Behat scenario that looks like the following: Scenario: Creating and booking an event Given I go to "http://domain.com/" And I am logged in with the username "user" and password "pass" And I follow "link" When I press "Book…
jamiemax
  • 179
  • 13
0
votes
1 answer

manipulating a tag label with mink

I would like to click on label corresponding to checkbox using mink php code. The code look like this: I can parse the checkbox for manipulation, can't parse the label. To parse the…
eskoba
  • 532
  • 1
  • 7
  • 25
0
votes
1 answer

How to close a single tab with Behat and Mink without closing all of the tabs?

We have a test that is clicking a link, and going to the newly opened tab to check if it has gone to the right page. Is there a way to close this newly opened tab? The step definitions currently look like this: /** * @Given /^the (?:|current…
KyleFairns
  • 2,947
  • 1
  • 15
  • 35
0
votes
1 answer

How to log in different users in Symfony under the same Behat scenario

I have a simple Scenario. Given Bob logs in And Alice logs in Bob edits Article 1 and Saves it. Alice edits Article 1 and saves but should see that Bob already did changes. Alice should reload -> Alice sees changes ... Honorable mentions…
stevenll
  • 1,025
  • 12
  • 29
0
votes
1 answer

Can't click on submit button. Behat/Mink

I have a form with submit button I tried a lot different ways to click on it, but it doesn't work. Why? I use Selenium Driver with PhantomJS browser. What I tried: $page =…
Pac Rauce
  • 229
  • 1
  • 5
  • 11
0
votes
1 answer

Check HTTP status in cycle. Behat + Mink, Goutte driver

I try to check HTTP status in cycle: foreach ($arrayOfLinks as $link) { $this->getMainContext()->getSubcontext('mink')->visit($link); $statusCode = $this->getSession()->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { …
Pac Rauce
  • 229
  • 1
  • 5
  • 11
0
votes
1 answer

How do I always maximize the window without having to call it in each function?

In JUnit, I would have done this in an @Before method but I don't see that in Mink. Does anyone know how to do this for all the tests instead of having to do $this->getSession()->maximize() in every function? Thanks
ihossain
  • 343
  • 1
  • 8
  • 19
0
votes
0 answers

Behat, Handling fatal error and continue to run the test

I have a test suite to execute using Behat, Mink , Selelnium. When ever my test are in the middle of the execution if I get fatal error, all the steps and test cases stopped executing after that error. How to handle it. Please help. I have gone…
Benefit
  • 11
  • 4
0
votes
1 answer

Using cucumber-mink with meteor-velocity

I have velocity installed and running on a meteor project. I came across cucumber-mink, and I am struggling to get my scenarios to work with steps defined in cucumber-mink. I added cucumber-mink to to cucumber dependencies { "name":…
A.Hidri
  • 41
  • 1
  • 5
0
votes
1 answer

How can I press on a button without a form using Goutte?

I am trying to use mink and behat to test out my application. One of the tests requires me to press on a button, but that button is tied to a javascript event. Not an actual form. When I run the test I keep getting the following error message. The…
json2021
  • 2,146
  • 2
  • 14
  • 28
0
votes
1 answer

Need help setting up Mink Extension for Behat

I am new to using the Mink Extension for Behat V3.0.15. The Mink version number is 1.7.0. I have set up the extension using the following configuration on my behat.yml file default: extensions: Behat\MinkExtension: base_url:…
json2021
  • 2,146
  • 2
  • 14
  • 28
0
votes
1 answer

Behat feature files in a separate git repo

We have a lot of PHP web applications and websites. I have created a behat/mink setup that will work for all of our apps/sites. I want all sites to share a common testing setup so I want to have the /test folder under each project as a Git…
zkent
  • 980
  • 1
  • 10
  • 22
0
votes
2 answers

behat FeatureContext.php how to skip a scenario

I try to find a way to skip scenarios in the FeatureContext.php. I got a test which i only will execute if a Condition is right, else der just will be skipped. My idea was to check the scenario with a tag like "@weeksale" @weeksale Scenario:…
Fanor
  • 53
  • 2
  • 8
0
votes
1 answer

Behat and Mink: assert page ignore trailing slash

I want to write simple test like: Given I am on "/" Then I should be on "/login" I want ignore trailing slash on assertion, so, if user redirected to /login/, assertion should not fail. Now it fail. How can I fix it?
Artur Eshenbrener
  • 1,850
  • 2
  • 17
  • 24
0
votes
1 answer

How to get value from a particular web element's CSS property using BEHAT/MINK (getCssValue) PHP

I am doing a exercise to use cssGetValue method to retrieve the value from a particular web element's CSS property. How to get CSS value from web element? this is my HTML code:
Ihor Bovkit
  • 120
  • 3
  • 9