Skip to content

Commit

Permalink
fix(browser): wait.
Browse files Browse the repository at this point in the history
  • Loading branch information
2e0byo committed Jan 29, 2022
1 parent 9ed5618 commit 6873228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yadc/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def bypass(self):
def wait(self):
waited = 0
self._logger.debug("Waiting as page is not ready yet.")
if self.WAIT_MSG in self._driver.page_source() and waited < self.MAX_WAIT:
if self.WAIT_MSG in self.page_source and waited < self.MAX_WAIT:
sleep(1)
waited += 1
if self.WAIT_MSG in self._driver.page_source():
if self.WAIT_MSG in self.page_source:
raise BrowserError(f"Page failed to load within {self.MAX_WAIT} s")

def find_element(self, by=None, value=None, bypass=True, wait=True):
Expand Down

0 comments on commit 6873228

Please # to comment.