Closed Bug 1208542 Opened 9 years ago Closed 9 years ago

test_add_to_new_contact_from_messages.py : NoSuchElementException: NoSuchElementException: Unable to locate element: note_0

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: MaxIvanov, Assigned: martijn.martijn)

References

Details

Attachments

(2 files)

Attached image index.png
Description: Test case fails with "NoSuchElementException"

Steps:
1. Update a flame device to 20150925030204
2. Run this test case http://lxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_add_to_new_contact_from_messages.py

Actual result:
NoSuchElementException

Expected result:
Test completes successfully.

Repro Rate: Reproducible via Jenkins (0/5 passing, unable to reproduce manually.
http://jenkins1.qa.scl3.mozilla.com/job/flame-kk.ui.adhoc.bitbar/252/HTML_Report/

Traceback (most recent call last):
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.17-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_add_to_new_contact_from_messages.py", line 45, in test_sms_create_new_contact
new_contact.type_comment(self.contact['note'])
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py", line 108, in type_comment
element = self.marionette.find_element(*self._comment_locator)
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 1579, in find_element
el = self._send_message("findElement", body, key="value")
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/decorators.py", line 36, in _
return func(*args, **kwargs)
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 711, in _send_message
    self._handle_error(resp)
  File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 752, in _handle_error
    raise errors.lookup(error)(message, stacktrace=stacktrace)
NoSuchElementException: NoSuchElementException: Unable to locate element: note_0
I very likely caused this, oops!
Assignee: nobody → martijn.martijn
Blocks: 1208094
Comment on attachment 8666194 [details] [review]
[gaia] mwargers:1208542 > mozilla-b2g:master

This fixes this test and I also made sure that test_keyboard.py still passes.
The add contact form is different between the 2 tests. In test_keyboard.py all the fields are visible from the beginning. In test_add_to_new_contact_from_messages.py they are hidden by default.
Attachment #8666194 - Flags: review?(npark)
Attachment #8666194 - Flags: review?(jlorenzo)
Comment on attachment 8666194 [details] [review]
[gaia] mwargers:1208542 > mozilla-b2g:master

LGTM
Attachment #8666194 - Flags: review?(npark) → review+
Comment on attachment 8666194 [details] [review]
[gaia] mwargers:1208542 > mozilla-b2g:master

I wonder why the comments field is the only one showing the problem, but the test passes correctly once the patch applied.
Attachment #8666194 - Flags: review?(jlorenzo) → review+
Because with the other fields, it is going through the _type_in_field method, which is handling the tapping and typing. Test_keyboard is mainly about the comment field, it is also using type_phone, where we get a double phone field (but I don't care much about that). We could have done also just use _type_in_field for type_comment, I don't think it would pose problems for test_keyboard actually.

Merged: https://github.com/mozilla-b2g/gaia/commit/2ff761b5c26363be1936e614ed3bf58aa9e36dbb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: