当前位置: 首页>>代码示例>>Python>>正文


Python UiTests.tap_back_button方法代码示例

本文整理汇总了Python中gaiatest.apps.ui_tests.app.UiTests.tap_back_button方法的典型用法代码示例。如果您正苦于以下问题:Python UiTests.tap_back_button方法的具体用法?Python UiTests.tap_back_button怎么用?Python UiTests.tap_back_button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gaiatest.apps.ui_tests.app.UiTests的用法示例。


在下文中一共展示了UiTests.tap_back_button方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestKeyboardPredictiveKey

# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_back_button [as 别名]
class TestKeyboardPredictiveKey(GaiaMtbfTestCase):

    def setUp(self):
        GaiaMtbfTestCase.setUp(self)
        # enable auto-correction of keyboard
        self.data_layer.set_setting('keyboard.autocorrect', True)

    def test_keyboard_predictive_key(self):
        # TODO: Merge gaiatest new test of predictive key
        self.ui_tests = UiTests(self.marionette)
        self.app_id = self.launch_by_touch(self.ui_tests)
        # go to UI/keyboard page
        keyboard_page = self.ui_tests.tap_keyboard_option()
        keyboard_page.switch_to_frame()

        # tap the field "input type=text"
        keyboard = keyboard_page.tap_text_input()

        # type first 6 letters of the expected word
        keyboard.switch_to_keyboard()
        expected_word = u'keyboard'
        keyboard.send(expected_word[:7])

        # tap the first predictive word
        keyboard.tap_first_predictive_word()
        self.apps.switch_to_displayed_app()
        keyboard_page.switch_to_frame()

        # check if the word in the input field is the same as the expected word
        typed_word = keyboard_page.text_input
        self.assertEqual(typed_word, expected_word)
        self.apps.switch_to_displayed_app()
        self.ui_tests.tap_back_button()
开发者ID:Mozilla-TWQA,项目名称:MTBF-Driver,代码行数:35,代码来源:test_mtbf_keyboard_predictive_key.py

示例2: TestEmailKeyboard

# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_back_button [as 别名]
class TestEmailKeyboard(GaiaMtbfTestCase):

    def test_basic_email_keyboard(self):
        self.ui_tests = UiTests(self.marionette)
        self.app_id = self.launch_by_touch(self.ui_tests)
        self.ui_tests.tap_ui_button()

        keyboard_page = self.ui_tests.tap_keyboard_option()
        keyboard_page.switch_to_frame()

        keyboard = keyboard_page.tap_email_input()
        keyboard.send('post')
        self.apps.switch_to_displayed_app()

        keyboard_page.switch_to_frame()
        keyboard_page.tap_email_input()
        keyboard.switch_to_keyboard()
        keyboard._tap('@')
        keyboard.send('mydomain.com')

        keyboard_page.switch_to_frame()
        typed_email_adress = keyboard_page.email_input
        self.assertEqual(typed_email_adress, u'[email protected]')
        self.apps.switch_to_displayed_app()
        self.ui_tests.tap_back_button()
开发者ID:Mozilla-TWQA,项目名称:MTBF-Driver,代码行数:27,代码来源:test_mtbf_email_keyboard.py

示例3: TestNumberKeyboard

# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_back_button [as 别名]
class TestNumberKeyboard(GaiaMtbfTestCase):

    def test_number_keyboard(self):
        self.ui_tests = UiTests(self.marionette)
        self.app_id = self.launch_by_touch(self.ui_tests)
        self.ui_tests.tap_ui_button()

        keyboard_page = self.ui_tests.tap_keyboard_option()
        keyboard_page.switch_to_frame()

        keyboard = keyboard_page.tap_number_input()

        self.assertEqual(str(keyboard.current_keyboard), 'number')

        keyboard.switch_to_keyboard()
        keyboard._tap('1')
        self.apps.switch_to_displayed_app()

        keyboard_page.switch_to_frame()
        typed_number = keyboard_page.number_input
        self.assertEqual(typed_number, u'1')

        self.apps.switch_to_displayed_app()
        self.ui_tests.tap_back_button()
开发者ID:Mozilla-TWQA,项目名称:MTBF-Driver,代码行数:26,代码来源:test_mtbf_number_keyboard.py


注:本文中的gaiatest.apps.ui_tests.app.UiTests.tap_back_button方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。