← Back to team overview

touch-packages team mailing list archive

[Bug 1335864] Re: click_element() sometimes fails if list item not visible/created

 

** Package changed: ubuntu-ui-toolkit (Ubuntu) => ubuntu-ui-toolkit

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1335864

Title:
  click_element() sometimes fails if list item not visible/created

Status in Ubuntu UI Toolkit:
  Incomplete

Bug description:
  grab this branch lp:~om26er/ubuntu-system-settings/add_ringtone_test
  and try to run the below test:

  ubuntu_system_settings.tests.test_sound.SoundTestCase.test_ringtone_setting_change_in_backend

  The test fails on the nexus 4 because the element goes out of screen
  due to auto-scroll.

  test-log: {{{
  13:40:38.061 INFO globals:58 - ************************************************************
  13:40:38.061 INFO globals:59 - Starting test ubuntu_system_settings.tests.test_sound.SoundTestCase.test_ringtone_setting_change_in_backend (with touch)
  13:40:38.063 WARNING testcase:116 - No tracing available - install the python-autopilot-trace package!
  13:40:38.242 WARNING testcase:157 - Process manager backend unavailable, application snapshot support disabled.
  13:40:38.243 INFO testcase:339 - Attempting to launch application 'ubuntu-system-settings' with URIs '' via upstart-app-launch
  13:41:06.518 ERROR proxies:410 - Introspect error on :1.317:/com/canonical/Autopilot/Introspection: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
  13:41:06.524 DEBUG proxies:413 - Executing introspect queue due to error
  13:41:31.643 DEBUG dbus:433 - Selecting objects of type MainWindow with attributes: {}
  13:41:31.713 DEBUG dbus:433 - Selecting objects of type MainWindow with attributes: {}
  13:41:31.743 INFO logging:45 - MainWindow: Open the sound settings page. Arguments (). Keyword arguments: {}.
  13:41:31.745 DEBUG dbus:433 - Selecting objects of type EntryComponent with attributes: {'objectName': 'entryComponent-sound'}
  13:41:32.056 DEBUG dbus:433 - Selecting objects of any type with attributes: {'objectName': 'systemSettingsPage'}
  13:41:32.488 DEBUG _common:45 - Moving to object's globalRect coordinates.
  13:41:32.488 DEBUG _uinput:475 - Tapping at: 298,753
  13:41:32.591 DEBUG dbus:433 - Selecting objects of type ItemPage with attributes: {'objectName': 'soundPage'}
  13:41:36.927 INFO logging:45 - ItemPage: Open the ringtone selector. Arguments (). Keyword arguments: {}.
  13:41:36.928 DEBUG dbus:433 - Selecting objects of type SingleValue with attributes: {'objectName': 'ringtoneListItem'}
  13:41:38.694 DEBUG _common:45 - Moving to object's globalRect coordinates.
  13:41:38.695 DEBUG _uinput:475 - Tapping at: 384,397
  13:41:39.747 DEBUG dbus:433 - Selecting objects of type SoundsList with attributes: {}
  13:41:39.823 INFO logging:45 - SoundsList: Choose a new ringtone. Arguments ('Celestial',). Keyword arguments: {}.
  13:41:39.824 DEBUG dbus:433 - Selecting objects of type QQuickListView with attributes: {'objectName': 'listView'}
  13:41:41.415 INFO logging:45 - QQuickListView: Click an element from the list. Arguments ('ringtone-Celestial',). Keyword arguments: {}.
  13:41:41.416 DEBUG dbus:433 - Selecting objects of any type with attributes: {'objectName': 'ringtone-Celestial'}
  13:41:41.862 INFO logging:45 - QQuickListView: Make the child visible. Arguments (<autopilot.introspection.dbus.OptionSelectorDelegate object at 0xb3a5d390>,). Keyword arguments: {}.
  }}}

  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/ubuntu_system_settings/tests/test_sound.py", line 59, in test_ringtone_setting_change_in_backend
      current_ringtone = sounds_list.choose_ringtone(ringtone)
    File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
      return f(instance, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/ubuntu_system_settings/__init__.py", line 212, in choose_ringtone
      list_view.click_element('ringtone-' + name)
    File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
      return f(instance, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/_custom_proxy_objects/_qquicklistview.py", line 48, in click_element
      self.swipe_child_into_view(element)
    File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
      return f(instance, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py", line 100, in swipe_child_into_view
      if not self._is_child_visible(child, containers):
    File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py", line 70, in _is_child_visible
      object_center = child.globalRect.y + child.globalRect.height // 2
    File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 520, in __getattr__
      self.refresh_state()
    File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 474, in refresh_state
      _, new_state = self.get_new_state()
    File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 564, in get_new_state
      raise StateNotFoundError(self.__class__.__name__, id=self.id)
  StateNotFoundError: Object not found with name 'OptionSelectorDelegate' and properties {'id': 53}.

  Ran 1 test in 65.959s
  FAILED (failures=1)

  ProblemType: Bug
  DistroRelease: Ubuntu 14.10
  Package: ubuntu-ui-toolkit-autopilot 0.1.47+14.10.20140619-0ubuntu1
  Uname: Linux 3.4.0-5-mako armv7l
  ApportVersion: 2.14.3-0ubuntu2
  Architecture: armhf
  Date: Mon Jun 30 13:42:18 2014
  InstallationDate: Installed on 2014-06-30 (0 days ago)
  InstallationMedia: Ubuntu Utopic Unicorn (development branch) - armhf (20140630-020204)
  PackageArchitecture: all
  SourcePackage: ubuntu-ui-toolkit
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1335864/+subscriptions