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

find by css selector doesn't work correctly

I have scenario /** * @Then I click on suggestion element */ public function iClickOnSuggestionElement() { $el = $this->getSession()->getPage() ->find('css', '.autocomplete-suggestion[data-index=0]'); if(!$el){ throw new…
yuklia
  • 6,733
  • 5
  • 20
  • 26
0
votes
0 answers

Node.js and npm installed. Command: install -g zombie, giving issues

When trying to install Zombie JS (command: install -g zombie), I getting many errors. The npm-debug output file is copied below. I have confirmed that npm and node is installed, npm -v outputs : 2.7.4 and node -v outputs: v0.13.0-pre install:…
SwCharlie
  • 80
  • 9
0
votes
1 answer

How to Login only one time and then run a lot of scenarios

I'm a newbie in BDD and i would like to know how can i do some step before the beginning of my scenarios but only one time. Concretely, i would like to login in my website and do some scenarios. Currently, i have a background which log my user and…
0
votes
1 answer

Behat 3 with Laravel 5: acceptance test passes but it should not

I'm doing my firsts acceptance tests for a Laravel 5 application using Behat 3 and Mink. The application runs under a Homestead VM. The test is straightforward and is located in the features/example.feature file. This is the test: Feature: Sample …
Marco Pallante
  • 3,923
  • 1
  • 21
  • 26
0
votes
1 answer

Behat 3 - Behat\Behat\Context\Step\Given not found

I'm testing Behat/Mink for the first time with a simple example. When I launch behat I have this error : PHP Fatal error: Class 'Behat\Behat\Context\Step\Given' not found in /var/www/behat-test/features/bootstrap/FeatureContext.php on line…
Sony
  • 1,773
  • 3
  • 23
  • 39
0
votes
1 answer

Behat/Mink - cant find element by xpath with goutteDriver

i am using Behat 3.0 and Mink 1.6. Those codes work with Selenium2 and Zombie, but not with Goutte: $this->assertSession()->elementTextContains('xpath', "//div[@id='pagecontent-shop']/form/table/tbody/tr[12]/td[2]", $arg1); $page =…
nitche
  • 121
  • 3
  • 13
0
votes
2 answers

How to upload file with Guzzle client?

I'm trying to do BDD testing on an upload method. I'm using Behat with Mink in a symfony2 project. Now I'm able to do simple request with this client: $this->client =…
stuzzo
  • 1,056
  • 1
  • 15
  • 36
0
votes
1 answer

Selenium 'dies' when visiting some websites using Behat / Mink

I'm trying to create a a custom scenario in Behat / Mink using the javascript capabilities of Selenium but I've hit a peculiar snag. I've stripped everything back to the bare bones to lay the problem out as simply as possible but in summary when…
G. House
  • 3
  • 1
0
votes
1 answer

Why Behat/Mink cant't find input field by ID, only by name?

I am testing page with behat and filling form. I have two password inputs in page html. First is on top: Second at the…
Safas
  • 43
  • 1
  • 6
0
votes
1 answer

How to get parameters from CMD for Behat?

I am testing new features in the new project branch, which has a new URL. I need to dynamically change the base url for Behat tests. How can I do it?
Mak
  • 11
  • 1
0
votes
1 answer

Preventing user login method running every single time after first login

I'm trying to find a way to create a session/cookie to handle user login so that the method below doesn't run query against the database every singe time. It is being called in nearly all the scenarios and slows the test suite a lot. Important note:…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
1 answer

Using @BeforeStep as static method in FeatureContext

I'm trying to turn beforeStep() method into static method because I need to use @BeforeSuite rather than @BeforeStep in annotations. When I do that $this become unusable. I did some changes to the original code but getting error below. Any solution…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
0 answers

behat symfony2 facebook api test

im using behat to test my symfony2 projects specifically a test project i have to be a sandbox for my bundles. One of the bundles to test is my FacebookBundle that integrate facebook api into symfony2 projects. This bundle provide several twig…
bitgandtter
  • 2,179
  • 6
  • 31
  • 60
0
votes
1 answer

Behat works fine but PhantomJS fails on dropdown menu when trying to click

Gherkin below works fine with behat but when I use PhantomJS I get error on When I follow "Profile" line below: Note: The element is a dropdown menu from bootstrap so it toggles after click. Error: Exception thrown by (//html/.//a[./@href][(((./@id…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
2 answers

Is there anyway to use Behat within a phpunit test case?

I've been using the Behat english-like test language (Gherkin?) to write test scripts but have quickly come up it's significant limitations. If I could execute these tests in PHP within the phpunit test scripts that I have set up I could…
paullb
  • 4,293
  • 6
  • 37
  • 65