diff --git a/test/test_selenium.py b/test/test_selenium.py index 1febe5d..6d195f3 100644 --- a/test/test_selenium.py +++ b/test/test_selenium.py @@ -19,3 +19,10 @@ class TestSelenium(TestCase): def tearDown(self): self.driver.quit() + + +class TestIDsForDuplicates(TestSelenium, TestCase): + def test_for_unique_ids(self): + ids = [x.get_attribute( + 'id') for x in self.driver.find_elements_by_xpath('//*[@id]')] + self.assertEqual(len(ids), len(set(ids)))