Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Adam Copley
    @adamcopley

    Hey anyone here? Using chromedriver extension by DMore, having a few issues:

    Works fine on local (mac os) if i run chrome in none-headless mode
    If i use on local in headless mode then my first scenario always fails bu then all of the others pass
    When I use on CI (circle CI using 7.2.17node-browsers image all scenarios fail on same issue as first on local which is "StreamReadException" no other info

    Phil
    @p2635
    How do I run tests in Behat in multiple browsers at the same time?
    alexandrubuganu
    @alexandrubuganu
    Guys, I have this issue when i try to select a radio button
    unknown error: Element <input type="radio" id="edit-profile-additional-field-gender-und-male" name="profile_additional[field_gender][und]" value="male" class="form-radio"> is not clickable at point (52, 446). Other element would receive the click: <label class="option" for="edit-profile-additional-field-gender-und-male">...</label>
    (Session info: chrome=74.0.3729.131)
    (Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 10.0.17763 x86_64) (WebDriver\Exception\UnknownError)
    How to resolve this?\
    Luke Leber
    @LukeLeber
    Hi @alexandrubuganu - have you tried scrolling the input into view before trying to click on it?
    locokiter
    @locokiter_gitlab
    Hi! has anyone had success passing to behat a parameter like a username from command line
    alexandrubuganu
    @alexandrubuganu
    Yes, i have tried
    https://www-stage.onlinevolunteering.org/en/sign-up -> this is the website, when I want to automatic choose Gender or Language i get lots of errors
    Antoine THOMAS
    @ttoine
    hello, I am looking for information about the support of PHP 7.3 for Behat
    but I can't find something like prerequisites or a clear status in the guide sections of the website
    Carlos Gude
    @TsubasaAkai_twitter
    Hi how can I return a value, for example a UID of one product for test if this product exisit?
    ash-m
    @ash-m
    I am looking for some good information on how to structure contexts. It's kind of a generic 'mentality' question. I don't have an example off the top of my head, but if I remember correctly, I had an instance where i thought I was testing 2 separate things when I ran all my tests, it ended up trying to run scenarios over contexts that clashed with other contexts... maybe this doesn't make much sense, but it'd be helpful to know if generally it's okay just if you working on a Foo service, that you can just do behat --init FooService (or w/e it is)
    matthewbrownbma
    @matthewbrownbma
    I am attempting to run the mink - extension example, but I am getting the following error when I get to the selenium portion -
    Unable to find a matching set of capabilities
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
    System info: host: 'QC06', ip: '172.16.9.15', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211'
    Driver info: driver.version: unknown
    remote stacktrace:
    I have the latest version of selenium and firefox... What am I missing here?
    ash-m
    @ash-m
    @TsubasaAkai_twitter by uid, you mean uuid? I assume you're asking about values which are known in a database. It depends on your test of course but I would generally stay away from employing tests which use infrastructure components; you can generally fake this behavior, for example, use a FakeProductRepository which does not use a connection to a database, but has all the same methods as a real Repository and returns some known set of data. Otherwise, there are extensions allowing you to inject your framework; so you can use that for E2E testing. We would need more specifics about what test you're trying to perform.
    ash-m
    @ash-m

    I have a few of Ciaran McNulty's videos and for the most part I think I understand that tests should be "declarative", not "imperative". However, I am trying to test an API which uses events to drive an infrastructure service, but I can't really think of good tests. The best I can think of are tests like

    Given I have payload ...
    When I POST ...

    or

    Given I have a machine
    When I set the machine to process
    Then it will be "processing"

    The problem with the second one is that it's a clear attempt to transcribe a state machine to a gherkin feature. I once replied to a state-machine question on SO with the example of an oven where in the idea was that an oven is HEATING when the oven is ON and below a temperature. With that simple scenario you can describe your tests with business rules and naturally come up with a state-machine as an after-thought. But in this kind if situation, the criteria for actions such as moving the machine to a processing state is just "I want the machine to start processing" ... so their aren't really any business rules around it. It is a requisite that you move the machine through states via the API, but that's about it.

    Idk, maybe it's foolish to avoid trying to write a test that just checks state. There is that at least:

    Given the machine is in state A
    And I move the machine to state B
    When I move the machine to state C
    Then it will be in state C

    It just doesn't seem like a super productive ruleset.

    ash-m
    @ash-m
    There really ought to be a tutorial on just suites, contexts and tags. Seriously, has anyone seen anything like that?
    Ana Carolina
    @feroline
    Can someone tell me what could cause this error ? :SyntaxError: Invalid or unexpected token (Behat\Mink\Exception\DriverException) . This occurs at the beginning of execution
    Sylvain G
    @meshenka
    Hi there
    i am trying to @Transform a PyStringNode body: and cannot make it work, i want to tranform data that comes in RestContext::iSendARequestTo()
    Alessandro Tagliapietra
    @alex88
    hello everyone, in 2.5 the pretty formatter had a time option, how so I specify that in the 3.0 behat.yml?
    Charles Crossan
    @crossan007
    Seeing a weird issue when running ChromeDriver 75, Behat 3.5.0, MinkExtension 2.3.1. Every call to fillField fails because Behat\Mink\Element::findAll returns null, and I get an ElementNotFoundException. I took a look at the generated xPath, and it looked really over-complicated(but might still have been valid).
    I opened an issue on GitHub so that the solution to this doesn't end up lost in chat: Behat/MinkExtension#345
    SirPL
    @SirPL
    @crossan007 - I found the same issue. Can you confirm that the $page->getContent() returns the page's source?
    Charles Crossan
    @crossan007
    @SirPL yes; $page->getContent() does return the DOM
    SirPL
    @SirPL
    So the very same issue
    Charles Crossan
    @crossan007
    It would seem so
    SirPL
    @SirPL
    I think I will revert the MinkExtension to some earlier version
    Charles Crossan
    @crossan007
    I'm not fully sure where the issue lies for me, since I had to use the newer version of Mink to fix the chrome/firefox issue (Mink was asking selenium for the wrong browser)
    I'll admit that the interactions between behat / Mink / MinkExtension / Selenium / ChromeDriver are a bit "mysterious" to me. I've got a vague understanding, but certainly could be better
    SirPL
    @SirPL
    I'm not sure either. But I'll give a try
    Charles Crossan
    @crossan007
    I know it used to work for me on windows, but no longer works. It continues to work in my CI environment (TravisCI / Linux / Saucelabs)
    SirPL
    @SirPL
    For me this is the very first time I'm using Behat... I was sure it's my fault
    So I'm a bit glad it's not me
    Charles Crossan
    @crossan007
    @SirPL Looks like it's a new issue with Chrome 75 :-) Chrome 74 works.
    Sadly, It seems really difficult to disable auto-upgrade on non-domain joined Windows machines
    Charles Crossan
    @crossan007
    why is Mink archived on the Behat GitHub organization? Is it dead? There haven't been any commits since 10/27/2014
    Charles Crossan
    @crossan007
    @SirPL not sure if you're following Behat/MinkExtension#345, but I found the solution to fillField failing - it's because ChromeDriver is defaulting to W3C mode, which isn't supported yet. Need to disable W3C mode in the behat.yml file (or however you're configuring your behat instance)
    Eduard Sukharev
    @eduard-sukharev
    Hi there. I have custom behat formatter (namely, allure formatter) which allows attaching test artifacts if exceptions of it's own ArtifactExceptionInterface are thrown. I have afterStep/afterScenario hook that can take screenshots, but at that point it's too late - formatter already has gotten it's exception and I cannot access it from AfterStepScope (it's Behat 3). I could also throw my own exceptions, but most basic steps are from MinkContext and RawMinkContext which use WebAssert class that throws it's own exceptions (in private methods).
    All that said, what would be the best way to handle this? Make edits to WebAssert and PR it into MinkExtension project? Somehow alter formatter and make a PR there?
    Christophe Coevoet
    @stof
    @crossan007 Mink repositories have been moved to the minkphp organization in 2014
    to keep repos more organized (as Mink involves quite a bunch of repos)
    Charles Crossan
    @crossan007
    @stof oh, haha. Thanks!
    Peter Anderson
    @BWPanda
    How does Behat determine what order tests are run in? i.e. in what order are *.feature files read?
    Peter Anderson
    @BWPanda
    I found out that features are read alphabetically, including subfolders.
    Jakub Zalas
    @jakzal
    @BWPanda worth to mention you shouldn't make assumptions in what order features are run
    assume random
    Peter Anderson
    @BWPanda
    @jakzal OK, good to know, thanks.
    rgristroph
    @rgristroph
    Hi Folks ! I am trying to track down why my Behat tests increase in memory usage for every test run. I'm using Behat v3.3.1 , on a Drupal 8 project, and with 6 simple tests the memory usage increases to a GB or so. Interestingly, it only does this on my travis test environment and not locally, as far as I can tell. It's not one test, it increases by 100 MB or so with each test I add. I'm not having luck trying to isolate a difference between the travisci environment at my local. Any suggestions ?
    Abdullah Bakhach
    @abbood
    Hey guys my Behat hangs when there are multiple scenarios, but works on a single one