Open pckbls opened 6 years ago
What am I supposed to do with v inside the JavaScript environment to yield the Python item that I need for further interaction?
See example in the wiki: https://github.com/cisco-open-source/qtwebdriver/wiki/QML-Specifics
Use v
to get attributes of the object. then èxecuteScript` returns their value, and you can assert.
Would it be possible to avoid the objectName workaround? Is it somehow possible to find the grip Element using its ID grip?
Not possible. We looked into it but Qt provides no programmatic access to id. To query id, only way is with objectName.
Hi there,
I'm currently playing around with qtwebdriver and the calqlatr example from the official Qt docs. I've sucessfully managed to cross-compile qtwebdriver for Android and bake the qtwebdriver into the calqlatr Android APK. Pressing the calculator buttons and reading the display values also works fine. Thank you for creating qtwebdriver!
Now I'm facing the following situation: Inside
Display.qml
I can find the following QML definition:Now I want to find the element with the
grip
ID. Right now I'm using the following piece of Python code:which works but it does not actually uses the element's ID for lookup. If someone changed the order of the
Image
definitions in the QML file, my code would break.According to some of the other issues posted here on GitHub one workaround would be, assigning a
objectName
property to the Item and then executing some custom JavaScript, e.g.:What am I supposed to do with
v
inside the JavaScript environment to yield the Python item that I need for further interaction?Would it be possible to avoid the
objectName
workaround? Is it somehow possible to find the grip Element using its IDgrip
?