Skip to content

Commit

Permalink
Try different ways to wait on the table to load properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Sep 9, 2024
1 parent 91bee73 commit d9b5aa0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions airgun/views/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from time import sleep
from widgetastic.widget import (
Checkbox,
ConditionalSwitchableView,
Expand Down Expand Up @@ -465,8 +464,12 @@ def remove(self, value):

def read(self):
"""Read all table values from both resource tables"""
self.browser.wait_for_element(self.table, exception=False, visible=True)
sleep(3)
self.browser.wait_for_element(locator='//h4[text()="Loading"]', exception=False)
self.browser.wait_for_element(
self.table, exception=False, ensure_page_safe=True, timeout=10
)
self.browser.plugin.ensure_page_safe(timeout='60s')
self.table.wait_displayed()
self.select_status("All")
return self.table.read()

Expand Down

0 comments on commit d9b5aa0

Please sign in to comment.