diff --git a/electionpage/tests.py b/electionpage/tests.py index 830c6a17..9243b042 100644 --- a/electionpage/tests.py +++ b/electionpage/tests.py @@ -118,8 +118,8 @@ def test_election_pages(self): self.assertEqual(bargraphButton.get_attribute('class'), 'btn btn-primary') # And the height was correctly set via PostMessages - self.assertEqual(bargraphIframeWrapper.find_element( - By.TAG_NAME, 'iframe').get_attribute('height'), '328px') + self._ensure_eventually_asserts(lambda: self.assertEqual(bargraphIframeWrapper.find_element( + By.TAG_NAME, 'iframe').get_attribute('height'), '328px')) @Mocker() def test_scrape_all(self, requestMock):