appfolio / ae_page_objects

Page Objects for Capybara
MIT License
28 stars 9 forks source link

Wrapped Capybara::ElementNotFound error in AePageObjects::LoadingElementFailed #67

Closed ipmsteven closed 10 years ago

ipmsteven commented 10 years ago

Capybara::ElementNotFound is raised from Capybara#find calls.

Prior to these changes creating a new Element could fail for either Capybara::ElementNotFound or AePageObjects::LoadingFailed.

The changes map Capybara::ElementNotFound exceptions to AePageObjects::LoadingFailed and fix a bug in ElementProxy#presence which was only handling Capybara::ElementNotFound.

Additionally, these changes make the loading failure mode across Documents and Elements consistent by having both modes raise AePageObjects::LoadingFailed subtypes for all loading failures.