I'm trying out the Blackbox Driver with the example feature from http://www.dspeak.com/drupalextension/blackbox.html (base_url: https://drupal.org). I managed to configure all the regions in behat.yml:

region_map:
        content: "#content"
        footer: "#footer"
        left header: "#header-left"
        right header: "#header-right"
        right sidebar: "#column-right"

However, I don't know how to configure the message mappings so I get the following error message:

01. No such selector configured: error_message_selector
    In step `Then I should see the error message "Password field is required"'. # FeatureContext::assertErrorVisible()
    From scenario `Error messages'.                                             # features\blackbox.feature:37
    Of feature `Test DrupalContext'.                                            # features\blackbox.feature

Any pointers welcome.

TIA
Frank

Comments

Frank Ralf’s picture

Status: Active » Closed (fixed)

I've found the answer in behat.yml.dist:

selectors:
        message_selector: '.messages'
        error_message_selector: '.messages.messages-error'
        success_message_selector: '.messages.messages-status'

However, adding some information about configuring selectors in README.md in addtion to defining regions might be helpful.

Frank Ralf’s picture

Issue summary: View changes

corrected typo

sobi3ch’s picture

Issue summary: View changes

This wasn't very clear and it took me couple attempts before I figure out I need regioin_map in my behat.yml file and proper tabs to make it work. Full example in my gist example: https://gist.github.com/sobi3ch/10867760