如何为webdriver编写keyDown和keyUp? [英] How to write a keyDown and keyUp for webdriver?
本文介绍了如何为webdriver编写keyDown和keyUp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为webdriver编写keyDown和keyUp,类似于硒.我知道如何使用动作,但是尽力找到一种编写通用(适用于特殊键和普通键)keyDown函数的方法.
I'm trying to write a keyDown and keyUp for webdriver, similar to selenium. I know how to use Actions, but dint find a way to write a generic(working for special and normal keys) keyDown function.
类似selenium的东西,它接受键码以及键.有什么想法吗?
Something like selenium which accepts keycode as well keys. Any ideas?
推荐答案
在org.openqa.selenium.interactions中查看JavaDoc的KeyUpAction和KeyDownAction:
Look at the JavaDoc for KeyUpAction and KeyDownAction in org.openqa.selenium.interactions:
已移至GitHub:
另请参阅:
这篇关于如何为webdriver编写keyDown和keyUp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文