Closed Bug 865062 Opened 11 years ago Closed 8 years ago

Marionette cannot find contacts in the list that aren't currently displayed on screen / require scroll

Categories

(Remote Protocol :: Marionette, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: rwood, Unassigned)

References

Details

(Keywords: pi-marionette-displayed, Whiteboard: [displayed])

Attachments

(2 files)

Attached file Logcat
In the Contacts app, a maximum number of 6 contacts are displayed on screen at once, without having to scroll down.

When there are more than 6 contacts on the device, Marionette fails to find any contacts after the 6th one. My gaia-ui endurance test adds a new contact, returns to the main contacts list, then clicks on the new contact to edit it. Works fine until we reach the 7th new contact, then the test fails with "element not visible".

This is the test:

https://github.com/rwood-moz/gaia-ui-tests/blob/gaiastress/gaiatest/tests/stress/test_stress_add_edit_contact.py

I am using today's (Apr23) b2g18 nightly pvt build on Unagi. The host machine has the latest Marionette 0.5.24 and gaiatest 0.9, and the latest MozBase.

Attached is a logcat and console output. Thanks!
Attached file Console output
I faced with similar situation when using the UI Test app in test_apps. This app contains a long list just like Rob's case.
In my case marionette.find_element() did found the element out of screen and tries to scroll the list to move element on the screen. But sometimes it stop as soon as the element partially appears on the screen (maybe only 1 pixel is shown on screen.)
This cause the following .tap() not working since .tap() is clicked on the center of the element which is not shown yet.

The workaround is add the following line after find_element()

self.marionette.execute_script('arguments[0].scrollIntoView(false);', *the-element-you-want-to-show*)

This will force the element to be shown on screen.



I think find_element() should be modified to show complete element. Or, provide users another function like move_into_screen() after calling find_element()
Update: This is now working, at least when running the add_edit_contact endurance test on hamachi master (50 successful iterations).
Whiteboard: [displayed]
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: