Skip to content

Conversation

@weixing2014
Copy link

@weixing2014 weixing2014 commented Nov 2, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants