These are chat archives for Behat/Behat

12th
May 2017
Emmanuel Pire
@lipsumar
May 12 2017 09:00
Hi there :wave:
I'm trying to setup Behat 3 with browserStack but i only seem to find outdated tutorials and docs. Could someone point to an updated doc or example ?
So far i'm getting this error:
Curl error thrown for http POST to http://localhost:4444/wd/hub/session with params:....
which seems to me it's trying to connect to a local selenium server instead of using browserstack
Emmanuel Pire
@lipsumar
May 12 2017 09:43
i almost figured it out:
  calls:
    error_reporting: 16383 # E_ALL & ~E_USER_DREPRECATED
  suites:
    default:
      contexts:
        - FeatureContext:
            doctrine: "@doctrine"
            container: "@service_container"
            em: "@doctrine.orm.default_entity_manager"
        - Sanpi\Behatch\Context\RestContext
        - Sanpi\Behatch\Context\JsonContext
  extensions:
    Behat\Symfony2Extension:
      kernel:
        env: "test"
        debug: "true"
    Behat\MinkExtension:
      base_url: "http://www.my-public-host.com/"
      default_session: selenium2
      selenium2:
        wd_host: https://my-user:my-access-key@hub-cloud.browserstack.com/wd/hub
        capabilities: { "browser": "firefox"}
but if i try to define an "os" in capabilities, i get:
  Unrecognized option "os" under "testwork.mink.sessions.selenium2.selenium2.capabilities"
Emmanuel Pire
@lipsumar
May 12 2017 12:35
I'm also wondering how i define multiple browser/os, so my tests can run in IE/FF/Chrome/etc.. at the same time
SamyOteroGlez
@SamyOteroGlez
May 12 2017 12:44
@lipsumar To have multiple browser support I would recommend to have a profile defined for each browser, that could be a way.
SamyOteroGlez
@SamyOteroGlez
May 12 2017 12:55
Also you will need the driver for each browser and configure it
tell selenium to start using the driver
and, in my experience, the last version of selenium server "never" works with the last version of the browser. :)