Skip to content

Commit

Permalink
Merge pull request SFDO-Tooling#894 from SFDO-Tooling/feature/related…
Browse files Browse the repository at this point in the history
…-list-scroll-timeout

Avoid infinite scrolling if the related list isn't found
  • Loading branch information
David Glick authored Dec 5, 2018
2 parents b27cee9 + 48e417d commit 50da91c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cumulusci/robotframework/Salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ def load_related_list(self, heading):
"""
locator = lex_locators["record"]["related"]["card"].format(heading)
el = None
i = 0
while el is None:
i += 1
if i > 50:
raise AssertionError(
"Timed out waiting for {} related list to load.".format(heading)
)
self.selenium.execute_javascript(
"window.scrollTo(0,document.body.scrollHeight)"
)
Expand Down

0 comments on commit 50da91c

Please sign in to comment.