Behat/Mink — Issue #211: Can't find a textbox from its label's text
Author: clemherreman
Created: 2012-03-05 01:32:05+00:00
State: open

Hello,
While playing with Mink + Behat, I stumbled upon this : given this

```html
Téléphone

```

It seems I can't fill this textbox using the `label`'s text, "Téléphone", but I can using the input `name`, "phone".

## Testcase

```yaml
# behat.yml
default:
context:
parameters:
base_url: http://www.widop.com/
```

```gherkin
# feature/test.feature
Feature: Input with accent in labels
In order to test my application's form
As a developer
I need to be able to fill in inputs using their labels text

Scenario: Filling an input from its label text.
Given I am on "/test.html"
When I fill in "Téléphone" with "0123456789"
```

```html

Index page

Téléphone

DaPhone

```

### Output

```
Scenario: Filling an input from its label text. # features/bug.feature:6
Given I am on "/test.html" # FeatureContext::visit()
When I fill in "Téléphone" with "0123456789" # FeatureContext::fillField()
Form field with id|name|label|value "Téléphone" not found
```

### Expected

I feel like I'm missing something, and I'm not sure that it is a bug. However, if it is not, that would be very nice to be ble to filll in an input from its label **text** instead of **name**.

Thanks :)