Allows for each driver implementation to have its own element so that custom code can be isolated.
Unfortunate downside, elements are no longer lazily loaded so page.el("h1").should be_on_page is no longer possible. It will raise an error on page.el("h1") if there is no h1 tags to find.
The original intent of having elements be lazily loaded was so that we could have having complicated spec matchers. Ruby's Capybara library has more than a handful of custom expectations to work around this
Allows for each driver implementation to have its own element so that custom code can be isolated.
Unfortunate downside, elements are no longer lazily loaded so
page.el("h1").should be_on_page
is no longer possible. It will raise an error onpage.el("h1")
if there is no h1 tags to find.The original intent of having elements be lazily loaded was so that we could have having complicated spec matchers. Ruby's Capybara library has more than a handful of custom expectations to work around this
We didn't need all these because the lazy matching allowed us to be able to handle the case where the element was missing.
The upside of this change is that when we add in an in-memory driver, it can produce elements in its own way.
This would be a breaking change.