From 829ac3569034ef77972d3a62a2cf27ce0b2b3d66 Mon Sep 17 00:00:00 2001 From: vgraph Date: Tue, 11 Jun 2019 17:44:02 +0300 Subject: [PATCH] test_number_of_clocks added --- TestYandexTime.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TestYandexTime.py b/TestYandexTime.py index 7f2c1ef..e415376 100644 --- a/TestYandexTime.py +++ b/TestYandexTime.py @@ -13,8 +13,9 @@ def driver(request): class TestYandexTime: + number_of_clocks = 5 - def test_01(self, driver): + def test_number_of_clocks(self, driver): driver.get("https://yandex.ru/time/") - first_city = driver.find_element_by_css_selector(".city__label") - print("Text:", first_city.get_property("textContent")) + cities = driver.find_elements_by_css_selector(".city__label") + assert len(cities) == self.number_of_clocks