You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.:
deffind_grip(self):
returnself._driver.execute_script('var v = ObjectNameUtils.findChild("grid"); return v.WHAT_PROPERTY_AM_I_SUPPOSED_TO_USE_HERE;')
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 ID grip?
The text was updated successfully, but these errors were encountered:
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 ID
grip
?The text was updated successfully, but these errors were encountered: