ae_page_objects
ae_page_objects copied to clipboard
xw - increase wait_until time when loading a page
This change is due to some flakey tests I found in my project.
In short, it's possible that DocumentLoader tries to load an AePageObject document before the AePageObject document is ready, especially when the document takes more than 5 seconds to load Under such a circumstance, it throws an exception like below:
Minitest::UnexpectedError: AePageObjects::DocumentLoadError: Couldn't find document with type in ["PropertyPageObjects::Reports::BufferedGeneralLedgerPage"] in any of the open windows: [{:window_handle=>"{cbf5df5a-b2db-cc41-a073-c50b3220aeaa}", :document=>"#<PropertyPageObjects::Reports::Responsive::TwelveMonthIncomeStatementPage:0x007f8b148c5400>"}, **{:window_handle=>"{e867c2a5-24d0-7342-a872-ee2176356988}", :document=>"<none>"}**]
To fix this issue, I set the default loading time to 10 seconds when DocumentLoader tries to load an AePageObject document. This change should be able to fix the most flakey tests (I'll be surprised if any page requires more than 10 seconds to load) and to avoid the similar flakey cases in the future.