assaf/zombie — Issue #260: Allow Browser.select() to select by option textContent
Author: nauhygon
Created: 2012-01-14 17:15:49+00:00
State: open

Currently Browser.select() allows to select an option by value or label. It would make a Zombie lover's life like mine much easier to also allow to choose an option based on its [textContent](https://developer.mozilla.org/En/DOM/Node.textContent) because that's what I see and I don't have to look hard at the values and labels embedded in the page source.

For example, I would like to

```javascript
var browser = new Browser();
browser.visit(url, function() {
browser.select("month", "Jan 2011");
});
```

from

```html

Jan 2011

Feb 2011

Mar 2011

```

While we are at it, maybe also a good idea to strip leading/trailing spaces of the textContent.