Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chris Lock
    @catharsisjelly
    composer require behat/behat ^2.5
    Wayne Hazle
    @waynehazle_gitlab
    thank you @catharsisjelly !
    suswari
    @suswari
    Hi Guys, I am finding for some help. Here is my problem - I am trying to set a timeout for the page and I am aware that the timeout would throw an error. The following is the code I have: try{
    $this->getDriver()->setTimeouts(['page load'=>5000]);
    }
    catch (Exception $e){
    var_export('in catch');
    }
    setTimeouts is thorwing an error, the error is not caught with the catch block. Can some help me in knowing what is the exception that setTimeouts is thorwing so that can be caught??
    pokoti
    @Vlad_Master_twitter
        if ($this->getSession()->getDriver() instanceof Selenium2Driver) {
            $this->getSession()->getDriver()->setTimeouts([
                'page load' => 60000,
            ]);
        }
    Vinícius
    @vinicius978
    How do you guys wait for elements that will receive an action but it's not available yet? Deal with AJAX events or with the spin() function?
    SamyOteroGlez
    @SamyOteroGlez
    there is a function to wait certain amount of time. $this->getDriver()->wait()
    Christophe Coevoet
    @stof
    well, if you just want to wait for some time, usleep would be more efficient actually. The driver API is most useful to pass a JS expression as condition, to wait until it becomes truthy (in the limited of the provided time)
    Vinícius
    @vinicius978
    @SamyOteroGlez I just want to wait the amount of time taken to element appear on screen after the AJAX finished. Got it?
    @stof how can i user this driver API?
    SamyOteroGlez
    @SamyOteroGlez
    @vinicius978
    You could use usleep, as @stof sugested, and wait enough time (lets say, if it usually take 10 sec to do the query and to show the element, you could wait for 30 sec, but that's dirty, it will prove your concept, but dirty). Or you could implement some with $this->getDriver()->wait() evaluating the javascript in charge to launch the element you are waiting for.
    @vinicius978
    You could also use this same logic but adapted to your needs. In that post the intent is to test a modal launched by a js action.
    https://stackoverflow.com/questions/43879989/how-to-test-a-bootstrap-modal-using-behat-mink-and-selenium-standalone-server
    Wayne Hazle
    @waynehazleguidance
    What "reporting" functionality is there in Behat? After I run a suite of tests I want to be able to email a report out to a list of people. I image this is not built into Behat and a plugin or something needs to be used. Has anyone had any success?
    Wayne Hazle
    @waynehazleguidance
    by the way I am using Behat 2.x and I found it's HTML output feature. It is OK, but I would like to customize it and make a much simpler pass/fail report. Has anyone done this?
    Finally I just found in version 3 that there is a plugin that allows much better reporting. Has anyone used this?
    SamyOteroGlez
    @SamyOteroGlez
    @waynehazleguidance
    This is a very good, easy to customise, reporting extension for behat. "emuse/behat-html-formatter"
    Wayne Hazle
    @waynehazleguidance
    @SamyOteroGlez I will have to upgrade to Behat 3.0 to make that extension work
    Grzegorz Kaszuba
    @uirapuru
    Hi guys. I just can't get this working on two different machines: composer require behat/behat --dev, after installation I try ./bin/behat and I get this:
    uirapuru@uirapuru-tower:/var/www/new-calendar$ ./vendor/bin/behat
    
    In ContainerBuilder.php line 1001:
    
      You have requested a non-existent service "cli.output".
    any ideas?
    if it does matter:
    uirapuru@uirapuru-tower:/var/www/new-calendar$ php -v
    PHP 7.2.5-0ubuntu0.18.04.1 (cli) (built: May  9 2018
    Grzegorz Kaszuba
    @uirapuru
    ok, I downgraded to 3.4.1 and it works ok
    Wayne Hazle
    @waynehazleguidance
    How do I create UI Maps for a page? Need to be able to tell Behat how to click a button or enter text in a box or choose a dropdown and I don 't know all the definitions of the objects on the page
    suswari
    @suswari
    @waynehazleguidance Hi, Please excuse me if I got your question incorrect. But if you are asking how to find an element on any page - there are locators like css, id , xpath etc; which help identifying an element on the page. If you are asking how to the pass elements to predefined contexts like in mink context - you don't have worry much about defining elements your self using locators, instead just pass in appropriate hints related to the element as needed by the context.
    Hi all, My Behat tests stop interim if any scenario fails in a feature file. Instead I want to run the whole suite of tests just marking the failed and passed scenarios. Is there a way/configuration in Behat to continue tests on failure of a scenario? -- Thanks
    Christophe Coevoet
    @stof
    @suswari actually, Behat has an option to stop the execution on the first failure, but it is off by default. So check your config file
    suswari
    @suswari
    @stof Thanks for you reply, Let me check that
    Rich Bodo
    @richbodo
    Anyone using Behat with Drupal 8?
    We are trying to debug doobie, a D7 module that uses the php behat suite, and we're looking for some tips. URLs seem to be mangled a bit on the way into the Behat DSL engine.
    jazzcool31
    @jazzcool31
    Anyone getting an issue on I am on "xyz" # Drupal\DrupalExtension\Context\MinkContext::visit()
    DMore\ChromeDriver\StreamReadException in /var/www/ibm/vendor/dmore/chrome-mink-driver/src/DevToolsConnection.php:70
    Stack trace:
      #0 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/DevToolsConnection.php(52): DMore\ChromeDriver\DevToolsConnection->waitFor(Object(Closure))
      #1 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/ChromePage.php(42): DMore\ChromeDriver\DevToolsConnection->send('Page.navigate', Array)
    I am using BLT with dMore extension
    Please suggest if anyone has any solution on same, i am struggling for last couple of days
    Ghost
    @ghost~5b5995f1d73408ce4fa26375
    Hey, I am trying to use a DI container in Behat Contexts. At first, I used a ContextInitializer and called a setDIContainer() method, which works, but is messy and uses a lot of boilerplate code.
    What I am now trying is using the ContainerBuilder that is passed to the extension, and filling it with my own services.yaml
    Parameters work ok, but services are ignored.
    Any ideas?
    Ghost
    @ghost~5b5995f1d73408ce4fa26375
    :-O Ha, what? You can just paste your services.yaml in the behat.yaml? That is so cool!
    Why is that not documented anywhere? I had to debug Behat for an hour now to stumble across that feature after several hours of trying to find other ways.
    I will write a blog post on this now (german, though), maybe save some other guys a few hours of searching.
    Ghost
    @ghost~5b6c4ba5d73408ce4fa4115c
    hi all, anyone here?
    Douglas Reith
    @redthor
    new to behat - using symfony 4 with dotenv .env - is there a standard practice for loading the values in .env into the behat environment so my test cases don't fail?
    Douglas Reith
    @redthor
    ok, so I worked it out, features/bootstrap/bootstrap.php is loading DotEnv but only if APP_ENV is not defined, I unset that in my local environment and now all is fine
    Jaroslav Rakhmatoullin
    @tox2ik
    Is there a way to force behat to write exceptions / errors / notices to the configured (php.ini) error_log instead (or in addition to) of rendering them in the output?
    Renato Marinho
    @renato2marinho_twitter

    Hey guys, I'm GitScrum founder. I want to invite group members to get to know GitScrum. Site: https://site.gitscrum.com/

    GitScrum’s agile approach to project management has proven itself to be a time and money saving strategy with the flexibility to keep up with rapid changes.

    Victor Hugo
    @victorhsanjos_twitter
    Hi, I'm new to behat! I'm using transformers to get :card, :card1 and :card2. With this regular expression /^:card(\d*)$/ but not working.
    Bit Wombat
    @bitwombat
    @victorhsanjos_twitter post code :)
    mmilinkovic
    @mmilinkovic

    Hi there, i have some issue whit Behat on Lumen 5.2

    this is my post on StackOverflow so if somebody can leave a comment i would be thankfull

    https://stackoverflow.com/questions/52704017/problem-with-laravel-lumen-applicationpreparerequest-must-be-an-instance-of

    Christian Sciberras
    @uuf6429
    I've seen "exercise" mentioned in a few places around behat code and also some of the docs. What is it exactly? I couldn't find full documentation explaining it.
    Ciaran McNulty
    @ciaranmcnulty
    beforeExercise hook runs before the first suite
    And afterExercise after the end of the last suite
    Christian Sciberras
    @uuf6429
    ok, so exercise is a bit like a whole "profile" in behat.yml terms?
    Ciaran McNulty
    @ciaranmcnulty
    Yeah the whole shebang