From 15da3a8ea595e6e82444dd2bc697d35ec2c49ba0 Mon Sep 17 00:00:00 2001 From: Armando Neto Date: Wed, 17 Nov 2021 17:29:45 -0300 Subject: [PATCH] ipatests: Fix UI_driver method after Selenium upgrade `WebDriver.switch_to_active_element()` was deprecated in favour of `driver.switch_to.active_element`. Method was deprecated a long time ago, however deprecation message and proxy method were removed recently and are not present in latest version. https://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.switch_to_active_element https://www.selenium.dev/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.switch_to Issue: https://pagure.io/freeipa/issue/9029 Signed-off-by: Armando Neto Reviewed-By: Florence Blanc-Renaud --- ipatests/test_webui/ui_driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 5994dcf8c..0ecc38e78 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -1056,7 +1056,7 @@ class UI_driver: # Chrome does not close search area on click if list_cnt.is_displayed(): - self.driver.switch_to_active_element().send_keys(Keys.RETURN) + self.driver.switch_to.active_element.send_keys(Keys.RETURN) self.wait()