Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
🔨 Improve wait_for_text_to_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Dec 28, 2018
1 parent cb74460 commit 9a3c0f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def wait_for_element_by_css_selector(self, selector):
)

def wait_for_text_to_equal(self, selector, assertion_text):

def text_equal(driver):
return driver.find_element_by_css_selector(selector).text \
== assertion_text

WebDriverWait(self.driver, TIMEOUT).until(
EC.text_to_be_present_in_element((By.CSS_SELECTOR, selector),
assertion_text)
)
self.assertEqual(
assertion_text,
self.driver.find_element_by_css_selector(selector).text
text_equal
)

def snapshot(self, name):
Expand Down

0 comments on commit 9a3c0f5

Please sign in to comment.