Skip to content

Commit

Permalink
Better spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewest committed Oct 24, 2014
1 parent 55c0a66 commit 6244f69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ Behave.find('Birthday', 'display') // Searches EXACT text of all elements.
```

**#tryFind**

For those times when you don't want find to error (like checking that an element doesn't exist), you can use tryFind
`tryFind(identifier, [type])`

**#findAll**

findAll will allow you to find multiple elements (where as `find` errors unless it finds exactly 1)

**#fill**

`fill('identifier').with('some value').`
`fill` by itself really does nothing. it returns an object that has a "with" method where you fill the value.
It also has a special case of taking a form, and you can pass it an object with many values, like so...
Expand All @@ -74,17 +77,20 @@ findAll will allow you to find multiple elements (where as `find` errors unless
```

**#click**

`click(identifier)` // basically does find('identifier').trigger('click')
click can take a string or a jquery object.
ex. `click('Create')`. Or `var button = find('Create') ; click(button)`
click also handles angular idiosyncracies like a radio element needing to do '.click().trigger('click')'


**#select**

`select('value').from('dropdownIdentifier')`
Basically like click, except with dropdowns.

**Global Methods**

For convenience (and because it should only get loaded during tests), Behave aliases the following
methods to the window. So in your tests you can just do...
```
Expand Down

0 comments on commit 6244f69

Please sign in to comment.