From 382b092bc9d9d87eff1cb89e6bc05d9b482f6d16 Mon Sep 17 00:00:00 2001 From: Jordan Blasenhauer Date: Wed, 24 Apr 2024 18:15:45 +0200 Subject: [PATCH] simulate javascript keyboard --- tests/ui/services_page.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ui/services_page.py b/tests/ui/services_page.py index ee5d9410d..69e5f8a45 100644 --- a/tests/ui/services_page.py +++ b/tests/ui/services_page.py @@ -70,7 +70,9 @@ try: select_combobox = safe_get_element(DRIVER, By.XPATH, "//input[@data-combobox='']") assert isinstance(select_combobox, WebElement), "Combobox is not a WebElement" - select_combobox.send_keys("no plugin matching normally") + # Test simulate keyboard from js + DRIVER.execute_script("arguments[0].value = 'no plugin matching normally' ", select_combobox) + DRIVER.execute_script("arguments[0].dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));", select_combobox) # All tabs should be hidden total_tabs = DRIVER.execute_script("""return document?.querySelector('[data-tab-select-dropdown]')?.querySelectorAll('[data-tab-select-handler]').length""")