Skip to content
hekra01 edited this page Oct 4, 2015 · 3 revisions
  • Enable customization of long keypress behavior: https://github.com/cisco-open-source/qtwebdriver/issues/12 This is an alternative behavior to the one added in Manage key auto repeat below When processing:

    • /session/:sessionId/keys
    • /session/:sessionId/element/:id/value

    For each sequence of similar keys in the value, WD will generate QKeyEvents with the isAutoRepeatthe next events

    • first KeyPress event isAutoRepeat = false

    • last KeyRelease event isAutoRepeat = false

    • all intermediary events isAutoRepeat = true

      This beahvior is chosen at build time by setting the WD_CONFIG_ONE_KEYRELEASE flag in the wd.gypifile, as follows:

{
'variables': {
    'QT5': '1', # change to '0' to disable Qt5
    'WD_CONFIG_QWIDGET_BASE': '1', # 1 to support widget or hybrid web
    'WD_CONFIG_WEBKIT': '1', #1 to support Web views
    'WD_CONFIG_QUICK': '1', #1 to support QML
    'WD_BUILD_MONGOOSE': '1', #1 to inline mongoose code in WebDriver libraries. Otherwise CISCO_MONGOOSE paths below will be needed
    'WD_CONFIG_PLAYER': '0', #Set to 1 if qtmultimedia should be built. In case of Hawaii Cisco profile, set to 0
    'WD_CONFIG_ONE_KEYRELEASE': '1', # Set to 1 so that only the final key release is sent
    'QT_INC_PATH': '/home/user/Qt/5.2.0/gcc_64/include',
    'QT_BIN_PATH': '/home/user/Qt/5.2.0/gcc_64/bin',
    'QT_LIB_PATH': '/home/user/Qt/5.2.0/gcc_64/lib'
 },
}
  • Manage key auto repeat: https://github.com/cisco-open-source/qtwebdriver/issues/9

    When processing:

    • /session/:sessionId/keys
    • /session/:sessionId/element/:id/value

    For each sequence of similar keys in the value, WD will generate QKeyEvents with the isAutoRepeatthe next events

    • first KeyPress event isAutoRepeat = false
    • last KeyRelease event isAutoRepeat = false
    • all intermediary events isAutoRepeat = true
    • E.G: This python test code elem.send_keys(Keys.UP + Keys.UP)will generate
      • Event 1: type = press, code = UP, isAutoRepeat = false
      • Event 2: type = release, code = UP, isAutoRepeat = true
      • Event 3: type = press, code = UP, isAutoRepeat = true
      • Event 4: type = release, code = UP, isAutoRepeat = false
  • Undefined keys: https://github.com/cisco-open-source/qtwebdriver/issues/11

    When processing key codes with:

Clone this wiki locally