These are chat archives for Behat/Behat

10th
May 2017
Victor Boutté
@MrBoutte101
May 10 2017 01:25
Any good resources or documentation for how to leverage a faker library with behat?
Manoj Kumar D
@ManojKumarD19_twitter
May 10 2017 06:34
For my search.feature file browser is getting opened but for my login.feature file browser testing does not happen even when I alter my behat.yml file
behat.yml file I have used is
default:
extensions:
Behat\MinkExtension:
default_session: selenium2
goutte: ~
selenium2:
            # chrome
            wd_host: "http://127.0.0.1:4444/wd/hub"
            # chrome
            capabilities: { "browserName": "chrome", "browser": "chrome", "version":  "58", 'chrome': {'switches':['--no-sandbox']}}
        base_url: 'https://www.wikipedia.org/'
        # chrome
        browser_name: chrome
        files_path: 'files'
suites:
    default:
        contexts:
            - FeatureContext
When I change the url it is not working
SamyOteroGlez
@SamyOteroGlez
May 10 2017 12:39
@ManojKumarD19_twitter tried to use the url directly in your Context class and see if works. I think the best way to find the root and solve an issue sometimes is by elimination. If that works, you will know the issue is not in your Context but maybe in your configuration. That could lead you to pass the url as a parameter to the context class
SamyOteroGlez
@SamyOteroGlez
May 10 2017 14:41

Hi all.
It's there a way to define custom sessions in the behat.tml?

Behat\MinkExtension:
            goutte: ~
            selenium2: ~
                #wd_host: "http://127.0.0.1:4444/wd/hub"
            default_session: goutte
            javascript_session: selenium2
            base_url: "http://localhost:8000/"

I'm thinking in something like

Behat\MinkExtension:
            goutte: ~
            sahi: ~
           myCustomDriver: ~
            selenium2: ~
                #wd_host: "http://127.0.0.1:4444/wd/hub"
            default_session: goutte
            sahi_session: sahi
           myCustomDriver_session: myCustomDriver
            javascript_session: selenium2
            base_url: "http://localhost:8000/"