Closed Bug 1006999 Opened 11 years ago Closed 11 years ago

The HTMLElement.text doesn't work

Categories

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

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: askeing, Assigned: Bebe)

References

Details

run the test_sms_to_dialer.py, and the keypad.phone_number will try to get the phone number. HTML ========== <div id="phone-number-view-container"> <div class="phone-number-view-wrapper-input"> <input type="text" data-l10n-id="phoneNumberInput" readonly="readonly" class="phone-number-font font-light" id="phone-number-view" aria-label="Phone number" style="font-size: 40px;" /> <div id="fake-phone-number-view" style="font-size: 40px; font-weight: 300;">###_PHONE_NUMBER_###</div> </div> <button data-l10n-id="keypadDelete" data-value="delete" class="reset-button" id="keypad-delete" aria-label="Delete" style="visibility: visible;"> </button> </div> ========== However, we can not get phone number by self.marionette.find_element(*self._fake_phone_number_view_locator).text , it will return u''. The get_attribute('innerText') also return u'', but get_attribute('innerHTML') works fine.
See Also: → 1006995
Shouldn't this be posted in the Dialer component?
Let's do some investigation on our side; check that the fake_phone_number_view_locator's element's visible/size/location to determine how Marionette is interpreting it. Marionette may see it as hidden in which case it's a Marionette bug. Don't use innerText or innerHTML because they don't check whether it is visible to the user.
Blocks: 1006995
I will take a look and investigate if the locator
Assignee: nobody → florin.strugariu
the visible element in this view is 'phone-number-view' which is a input. To get it's value we use .get_attribute('value') [1] The fake-phone-number-view is not visible (and tbh I don't know what's used for). The self.marionette.find_element(By.ID, 'fake-phone-number-view').text returns "" As the .text method "Returns the visible text of the element, and its child elements." this is the expected result [2] The HTML looks like: ``` <div class="phone-number-view-wrapper-input"> <input id="phone-number-view" class="phone-number-font font-light" type="text" data-l10n-id="phoneNumberInput" readonly="readonly" aria-label="Phone number" style="font-size: 52px;"></input> <div id="fake-phone-number-view" style="font-size: 52px; font-weight: 300;"> 8555555 </div> </div> ``` [1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/apps/phone/regions/keypad.py#L34 [2] https://marionette_client.readthedocs.org/en/latest/#marionette.HTMLElement.text
This no longer blocks 1006995
No longer blocks: 1006995
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.