From 9ab40486f4e316e04d0fd7a47a53b3c5e7c200fd Mon Sep 17 00:00:00 2001 From: Hammad1007 Date: Thu, 18 Jan 2024 12:28:19 +0500 Subject: [PATCH] Update the code for button changing color --- theme-clock/tests/body/button/test_button.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/theme-clock/tests/body/button/test_button.py b/theme-clock/tests/body/button/test_button.py index 372cb7d..364b980 100644 --- a/theme-clock/tests/body/button/test_button.py +++ b/theme-clock/tests/body/button/test_button.py @@ -18,11 +18,10 @@ driver.get('http://127.0.0.1:5500/theme-clock/index.html') button = driver.find_element(By.XPATH, '/html/body/button') button.click() -# Wait for the changes to take effect (adjust wait time as needed) try: - # Find the new button after the changes + button = driver.find_element(By.XPATH, '/html/body/button') - + # Retrieve properties text = button.text background_color = button.value_of_css_property('background-color')