Skip to content

Commit

Permalink
test_statistic improved
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinaProsche committed Feb 21, 2024
1 parent ed59b0f commit 0145493
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_statistic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from basic_selenium_test import BasicSeleniumTest
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException

class StatisticTestSelenium(BasicSeleniumTest):

Expand All @@ -9,6 +10,9 @@ def test_open_statistic(self):
URL = self.getUrl('/check_list')
self.getDriver().get(URL)
self.getDriver().implicitly_wait(30)
obj = self.getDriver().find_element(By.CLASS_NAME, "fixed-table-container")
self.assertNotEquals(obj, None)

try:
string_in_table = self.getDriver().find_element(By.XPATH, "//table[@id='check-list-table']//tr/td/a")
self.assertNotEquals(string_in_table, None)
except NoSuchElementException:
empty_table = self.getDriver().find_element(By.CLASS_NAME, "no-records-found")
self.assertNotEquals(empty_table, None)

0 comments on commit 0145493

Please sign in to comment.