Closed Bug 1190562 Opened 9 years ago Closed 8 years ago

[RTL] couldn't find Gallery locator when testing with Arabic language

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: manel, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

When we test with Arabic language, the script couldin't find the element we need, error like this: TEST-UNEXPECTED-ERROR | test_Contacts_RTL.py TestContactsRTL.test_contacts_app | NoSuchElementException: NoSuchElementException: Unable to locate element: //*[text()="Gallery"] Because the device is in another language than en-US the script can't find the locator here: http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/system/regions/activities.py#48 so I think we should add an identifier to locale with it is better than finding by text!
Mentor: martijn.martijn
Depends on: 1188926
I think we need to add something like data-l10n-id value to get it work
I'll just make this bug block bug 1184600, which is the general bug to make Gaia UI tests locale agnostic.
Blocks: 1184600
No longer depends on: 1188926
Blocks: 1189468
Ok, what I see in webIDE is this: <menu id="action-menu-list"><button style="background-image: url(&quot;app://camera.gaiamobile.org/style/icons/camera_126.png&quot;);" class="icon" data-manifest="app://camera.gaiamobile.org/manifest.webapp" data-value="0">الكاميرا</button><button style="background-image: url(&quot;app://gallery.gaiamobile.org/style/icons/gallery_126.png&quot;);" class="icon" data-manifest="app://gallery.gaiamobile.org/manifest.webapp" data-value="1">المعرض</button><button data-l10n-id="cancel" data-action="cancel">ألغِ</button></menu> The dialog is part of the system app (all of the dialogs are, I think), so I found it that way and then by using the "Click on an element on the page" button.
Attached patch ac.diff (obsolete) (deleted) — Splinter Review
Something like this makes it work for me, but then we get the failure in the .name stuff, which is what bug 1188926 is about.
(In reply to Martijn Wargers [:mwargers] (QA) from comment #4) > Created attachment 8643305 [details] [diff] [review] > ac.diff > > Something like this makes it work for me, but then we get the failure in the > .name stuff, which is what bug 1188926 is about. I tried it in my side, but it's opened the Camera App not the Gallery App and I got an error for Time Out because the script used the Camera App and waiting to tap the button
Attached patch ac.diff (deleted) — Splinter Review
I guess this is a better selector. In any case, I think we should first fix bug 1188926. Manel, would you be willing to help with that, willing to change all the Wait() calls that we have out there in our Gaia UI tests to use .origin instead of .name?
Attachment #8643305 - Attachment is obsolete: true
(In reply to Martijn Wargers [:mwargers] (QA) from comment #6) > Created attachment 8643526 [details] [diff] [review] > ac.diff > > I guess this is a better selector. In any case, I think we should first fix > bug 1188926. Manel, would you be willing to help with that, willing to > change all the Wait() calls that we have out there in our Gaia UI tests to > use .origin instead of .name? Ok Martijin, I will do it today.
Mentor: martijn.martijn
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: