From c215383589f4251e81e432da539051aa8d817d02 Mon Sep 17 00:00:00 2001 From: Rodja Trappe Date: Thu, 2 Feb 2023 09:02:33 +0100 Subject: [PATCH] cleanup --- tests/test_dialog.py | 2 +- tests/test_keyboard.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_dialog.py b/tests/test_dialog.py index a42c009ba..1deabed6c 100644 --- a/tests/test_dialog.py +++ b/tests/test_dialog.py @@ -42,6 +42,6 @@ async def show() -> None: screen.click('Open') screen.click('No') screen.click('Open') - ActionChains(screen.selenium).send_keys(Keys.ESCAPE).perform() + screen.type(Keys.ESCAPE) screen.wait(0.5) assert results == ['Yes', 'No', None] diff --git a/tests/test_keyboard.py b/tests/test_keyboard.py index e206d516c..8ae3f8cae 100644 --- a/tests/test_keyboard.py +++ b/tests/test_keyboard.py @@ -1,4 +1,3 @@ -from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from nicegui import ui @@ -13,7 +12,5 @@ def test_keyboard(screen: Screen): screen.open('/') assert screen.selenium.find_element(By.ID, keyboard.id) screen.wait(1.0) - ActionChains(screen.selenium) \ - .send_keys('t') \ - .perform() + screen.type('t') screen.should_contain('t, KeyboardAction(keydown=False, keyup=True, repeat=False)')