def tap_send(self, timeout=120): self.wait_for_condition(lambda m: m.find_element( *self._send_message_button_locator).is_enabled()) self.marionette.find_element(*self._send_message_button_locator).tap() self.wait_for_element_not_present(*self._message_sending_locator, timeout=timeout) from gaiatest.apps.messages.regions.message_thread import MessageThread return MessageThread(self.marionette)
def tap_send(self, timeout=120): send = Wait(self.marionette).until( expected.element_present(*self._send_message_button_locator)) Wait(self.marionette).until(expected.element_enabled(send)) send.tap() self.wait_for_element_not_present(*self._message_sending_locator, timeout=timeout) from gaiatest.apps.messages.regions.message_thread import MessageThread return MessageThread(self.marionette)
def test_dialer_from_message(self): # Send a SMS to the device _text_message_content = "Automated Test %s" % str(time.time()) # Open first received message self.messages = Messages(self.marionette) self.messages.launch() self.data_layer.send_sms(self.testvars['carrier']['phone_number'], _text_message_content) self.apps.switch_to_displayed_app() self.messages.wait_for_message_received(timeout=180) # The received message causes thread to open message_thread = MessageThread(self.marionette) # Check the phone number message_thread.tap_header() keypad = message_thread.tap_call() self.assertEquals(keypad.phone_number, self.testvars['carrier']['phone_number'])
def tap_first_received_message(self): self.marionette.find_element(*self._first_message_locator).tap() from gaiatest.apps.messages.regions.message_thread import MessageThread return MessageThread(self.marionette)
def close(self): GaiaHeader(self.marionette, self._header_locator).go_back() from gaiatest.apps.messages.regions.message_thread import MessageThread return MessageThread(self.marionette)
def tap_send(self): self.marionette.find_element(*self._send_message_button_locator).tap() self.wait_for_element_not_present( *self._message_sending_spinner_locator, timeout=120) from gaiatest.apps.messages.regions.message_thread import MessageThread return MessageThread(self.marionette)