WebDriver-cisco-cmt-1.3.1
hekra01
released this
19 Jun 22:23
·
92 commits
to WD_1.X_dev
since this release
Features
-
Javascript expressions can locate QML elements by objectName: #6
Use
ObjectNameUtils.findChild()
in Javascript expression to access qml elements by objectName.
e.g: With this qmlRectangle { id: rect objectName: "rect" Text { id: button objectName: "button" text: "Home" } }
This test will work:
bText = webdriver.execute_script("var v = ObjectNameUtils.findChild('button'); return v.text;") assert 'Home' in bText
-
Manage key auto repeat: #9
When processing:
/session/:sessionId/keys
/session/:sessionId/element/:id/value
For each sequence of similar keys in the
value
, WD will generateQKeyEvents
with theisAutoRepeat
the next events- first KeyPress event isAutoRepeat =
false
- last KeyRelease event isAutoRepeat =
false
- all intermediary events isAutoRepeat =
true
- E.G:
This python test codeelem.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
Fixes: