DarthFubuMVC/Serenity — pull request #65 by mtscout6 (2014-01-29 03:13:18+00:00)
Title: Added By.jQuery functionality

When searching for elements on the screen, the default Selenium By selectors simply don't cut it. They require you to marshal a collection of elements only to need to filter on those elements, which tend to be brittle. The ideal solution is to do as much of the filtering in the browser as possible. Thus reducing your number of stale element exceptions.

jQuery is already a well tested framework that is on most modern web pages. The idea here is to leverage it's functionality to provide superior search functionality within the browser, while not re-implementing it's entire api.

While it is primarily focused towards jQuery, it is still extensible to allow you to do any JavaScript query you like. This is done by leveraging dynamic objects. As long as the JavaScript returns an html element then you can cast the script to a `OpenQA.Selenium.By` and pass it right in to `ISearchContext.FindElement`. I tried the best I could to avoid the cast, there are many work arounds but none of them were ideal.