本文整理汇总了Python中gaiatest.apps.ui_tests.app.UiTests.tap_ui_button方法的典型用法代码示例。如果您正苦于以下问题:Python UiTests.tap_ui_button方法的具体用法?Python UiTests.tap_ui_button怎么用?Python UiTests.tap_ui_button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.ui_tests.app.UiTests
的用法示例。
在下文中一共展示了UiTests.tap_ui_button方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestEmailKeyboard
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_ui_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()
示例2: TestUrlKeyboard
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_ui_button [as 别名]
class TestUrlKeyboard(GaiaTestCase):
def test_url_keyboard(self):
self.ui_tests = UiTests(self.marionette)
self.ui_tests.launch()
self.ui_tests.tap_ui_button()
keyboard_page = self.ui_tests.tap_keyboard_option()
keyboard_page.switch_to_frame()
# tap the field "input type=url"
keyboard = keyboard_page.tap_url_input()
keyboard.switch_to_keyboard()
# Test forward slash
keyboard._tap('/')
self.apps.switch_to_displayed_app()
keyboard_page.switch_to_frame()
typed_key = keyboard_page.url_input
self.assertEqual(typed_key, u'/')
# Test .com key
keyboard.tap_dotcom()
keyboard_page.switch_to_frame()
typed_key = keyboard_page.url_input
self.assertEqual(typed_key, u'/.com')
示例3: TestContextmenuActivityPicker
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_ui_button [as 别名]
class TestContextmenuActivityPicker(GaiaTestCase):
def test_contextmenu_activity_picker(self):
self.ui_tests = UiTests(self.marionette)
self.ui_tests.launch()
self.ui_tests.tap_ui_button()
contextmenu_page = self.ui_tests.tap_contextmenu_option()
activities_list = contextmenu_page.long_press_contextmenu_body()
self.assertTrue(activities_list.is_menu_visible)
self.assertTrue(activities_list.options_count == 4)
activities_list.tap_cancel()
self.assertFalse(activities_list.is_menu_visible)
示例4: TestWindowOpenInsideIframe
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_ui_button [as 别名]
class TestWindowOpenInsideIframe(GaiaTestCase):
def test_window_open_inside_iframe(self):
self.ui_tests = UiTests(self.marionette)
self.ui_tests.launch()
self.ui_tests.tap_ui_button()
window_open = self.ui_tests.tap_window_open_menu_option()
window_open.switch_to_frame()
# Tap on the second window.open
popup = window_open.tap_window_open_from_iframe()
popup.switch_to_frame()
self.assertEqual('Hello world!', popup.header_text)
# Tap on the 'X' button
popup.tap_x_button()
self.assertFalse(popup.is_popup_page_displayed, 'Pop-up did not close')
示例5: TestNumberKeyboard
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import tap_ui_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()