Questions tagged [behat]

Behat is a php framework for autotesting your business expectations. It's a Behavior Driven Development (BDD) framework for PHP, initially inspired by Ruby's Cucumber project. Now it's not only accepted as a PHP implementation of Cucumber, but it provides some quite unique features the original didn't have.

Behat is a php framework for autotesting your business expectations. It's a Behavior Driven Development (BDD) framework for PHP, initially inspired by Ruby's Cucumber project. Now it's not only accepted as a PHP implementation of Cucumber, but it provides some quite unique features the original didn't have.

1111 questions
10
votes
1 answer

How to find a text node element with Mink?

I was wondering, i have this HTML :
  • sf_tristanb
    • 8,725
    • 17
    • 74
    • 118
  • 10
    votes
    2 answers

    Behat "Unrecognized options"

    I'm trying to run Behat (first time for me) and it worked. But i have a configuration problem. I tried to change the paths of features and bootstrap like so: #behat.yml default: paths: features: app/tests/features bootstrap:…
    Patrick
    • 1,562
    • 1
    • 16
    • 33
    10
    votes
    2 answers

    Adding information to Behat output from custom context code

    I am trying to determine how I would add additional information to Behat's output (pretty, html, junit, etc) so I can have more contextual information for the test purposes. Specifically I have some unique data that gets generated during some of…
    Patrick
    • 3,302
    • 4
    • 28
    • 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
    10
    votes
    3 answers

    How to make Behat wait for an AJAX call?

    Scenario: Modify and save an incomplete change to a Campaign Given I click on the Campaign section folder And I press Save in the selected Campaign Then I should see an error balloon informing the changes cannot be saved Point is that this 'error…
    user806474
    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
    • 8,372
    • 2
    • 18
    • 26
    9
    votes
    2 answers

    Travis-CI + Sauce Connect + Behat: Unable to get Internet Explorer to run tests

    I have Travis-CI running Sauce Connect to run Behat tests. Everything works just fine if I tell Sauce to use Firefox 26 on Windows 7. But if I change the browser to Internet Explorer (any of the three versions that Sauce Labs makes available on…
    Trott
    • 66,479
    • 23
    • 173
    • 212
    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
    • 8,133
    • 2
    • 29
    • 52
    9
    votes
    1 answer

    Gherkin + Behat Scenario outline throws Behat\Gherkin\Exception\ParserException

    I am trying to run registration example and I am getting stuck Scenario: New user registration; poor password Given I am on "/register" When I fill in "username" with "admin" And I fill in "password1" with "" And I fill in "password2"…
    Fatmuemoo
    • 2,187
    • 3
    • 17
    • 34
    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,287
    • 2
    • 25
    • 36
    8
    votes
    3 answers

    Step definitions in external files in Behat

    Behat by default looks for the step definitions in file named FeatureContext (all steps in one file). Having a lot of steps, it's hard to maintain such a big file. I'd like to have one definition file per feature file. How can I have step…
    Sfisioza
    • 3,830
    • 6
    • 42
    • 57
    8
    votes
    2 answers

    org.openqa.selenium.NoSuchSessionException: Unable to find session with ID error testing with Behat/Mink and Selenium2Driver in docker container

    I'm trying to test a Symfony3 web application with Behat/Mink and Selenium2Driver so that I can test Javascript functionallity too. The application runs in a docker container, so I added a new docker container for selenium-hub and chrome as…
    Manolo
    • 24,020
    • 20
    • 85
    • 130
    8
    votes
    2 answers

    Javascript test : Selenium cookies data url

    I have a Behat test running Selenium whenever Javascript is needed. My current Behat test works just fine if Javascript (so Selenium is disable). At the moment, my only error feedback from Selenium is the following statement : unknown: Failed to…
    8
    votes
    2 answers

    Behat and Symfony data fixtures

    I'm wondering is it possible to use separate database for the Behat tests? is there any way to drop and truncate database and load data fixtures with it like you can do with PHPUnit?
    Einius
    • 1,352
    • 2
    • 20
    • 45
    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
    • 551
    • 1
    • 5
    • 13
    1
    2
    3
    74 75