Skip to content

Commit 8402c4d

Browse files
committed
Hack: Sleep before checking to see if the history panel auto updated.
1 parent c660269 commit 8402c4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_integration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import re
3+
import time
34
import unittest
45
from unittest.mock import patch
56

@@ -829,6 +830,9 @@ def test_ajax_refresh(self):
829830
self.get("/ajax/")
830831
make_ajax = self.selenium.find_element(By.ID, "click_for_ajax")
831832
make_ajax.click()
833+
# Sleep a tad to avoid a selenium.common.exceptions.StaleElementReferenceException
834+
# when looking for the small text of the history panel
835+
time.sleep(0.1)
832836
# Need to wait until the ajax request is over and json_view is displayed on the toolbar
833837
self.wait.until(
834838
lambda selenium: self.selenium.find_element(

0 commit comments

Comments
 (0)