Vis doesn't show QML elements of qt4testapp

Bug #1318701 reported by Torsten Scheck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot Qt Support
New
Undecided
Unassigned

Bug Description

Environment: 14.04 release using the qt4testapp from the libautopilot_qt unit tests.

export QT_SELECT=qt4
/usr/share/libautopilot-qt/qt4testapp -testability /usr/share/libautopilot-qt/qt4.qml &
autopilot vis

Using vis I don't see the QDeclarativeItem and the properties set by /usr/share/libautopilot-qt/qt4.qml.

When I run a simple test case with a print_tree() and a sleep, vis shows the element while the script is waiting:

mkdir -p autopilot/example/{tests,emulators}
touch autopilot/example/__init__.py
touch autopilot/example/tests/__init__.py

cat <<'EOF' >autopilot/example/tests/test_simple.py
from autopilot.testcase import AutopilotTestCase
from autopilot.matchers import Eventually
from testtools.matchers import Equals
from time import sleep

class Basic(AutopilotTestCase):
    def test_launch(self):
        full_path = '/usr/share/libautopilot-qt/qt4testapp'
        qml_path = '/usr/share/libautopilot-qt/qt4.qml'
        app_root = self.launch_test_application(full_path,
            qml_path, app_type='qt')
        # wait for window to become visible
        qml_view = app_root.select_single("QDeclarativeView")
        self.assertThat(qml_view.visible, Eventually(Equals(True)))
        # check a property value
        test_item = app_root.select_single("QDeclarativeItem",
            objectName="testItem")
        self.assertThat(test_item.intProperty, Equals(42))
        app_root.print_tree(output="tree.txt")
        # now vis also sees the QML items
        sleep(60)
EOF

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.