cisco-open-source / qtwebdriver

WebDriver implementation for Qt
https://github.com/cisco-open-source/qtwebdriver/wiki
197 stars 59 forks source link

Functional keys (F1-F12) shifted keycodes #33

Closed zebraxxl closed 7 years ago

zebraxxl commented 7 years ago

Hello all!

I've got some trouble with sending functional keys (F1-F12).

If I send F1 key as "\uE030":

Key_F1 = u'\uE030'
driver.send_keys(Key_F1)

than I've got error Unknown WebDriver key(57392) at string index (0). F1 key defined in Qt as: Key_F1 = 0x01000030.

But if I set Key_F1 to "\uE031" (as for key F2) - than all ok and application received F1 key event.

As I can understand, in Qt Web Driver, in source file src/webdriver/extension_qt/q_key_converter.cc in array QKeyConverter::kSpecialWebDriverKeys missed some element.

hekra01 commented 7 years ago

Hi,

Looking at the bindings, the correct value for F1 is '\ue031'

zebraxxl commented 7 years ago

I was get information about this from page https://github.com/cisco-open-source/qtwebdriver/wiki/Key-Input

I'm sorry. Thank you!