RedHatQE/cfme_tests — pull request #795 by mfalesni (2014-05-29 16:04:41+00:00)
Title: [Proposal] Element chaining

This patch enables to pass also functions to elements() call. When the object that should be resolved as an element is callable, then it is called like elements(o()). This makes possible to chain functions that depend on some parent element without worrying about some of them being stale because all the element chain will be resolved on each call.

A stupid example follows:
```python
table = lambda: element("//*[@id='consolidate_div']/fieldset[2]/table")
tbody = lambda: element("./tbody", root=table)
keys = lambda: element(".//td[contains(@class, 'key')]", root=tbody)
element(keys)
=>
```

I've got also another improvement, which I will post shortly.