浏览代码

pytest: check if timing problem

Rodja Trappe 2 年之前
父节点
当前提交
5f1fbee1f3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tests/test_element.py

+ 1 - 0
tests/test_element.py

@@ -11,6 +11,7 @@ def test_keyboard(screen: Screen):
     ui.keyboard(on_key=lambda e: result.set_text(f'{e.key, e.action}'))
 
     screen.open('/')
+    screen.wait(0.5)
     assert any(s.endswith('keyboard.js') for s in screen.get_attributes('script', 'src'))
     assert screen.get_tags('span')  # NOTE keyboard dom element is a span
     ActionChains(screen.selenium).send_keys('t').perform()