本文整理汇总了Python中gaiatest.apps.calendar.app.Calendar.flick_to_next_month方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.flick_to_next_month方法的具体用法?Python Calendar.flick_to_next_month怎么用?Python Calendar.flick_to_next_month使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.calendar.app.Calendar
的用法示例。
在下文中一共展示了Calendar.flick_to_next_month方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_calendar_flick
# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import flick_to_next_month [as 别名]
def test_calendar_flick(self):
"""https://bugzilla.mozilla.org/show_bug.cgi?id=937085"""
calendar = Calendar(self.marionette)
calendar.launch()
calendar.flick_to_next_month()
self.take_screenshot()
calendar.flick_to_previous_month()
self.take_screenshot()
calendar.flick_to_previous_month()
self.take_screenshot()
calendar.tap_week_display_button()
time.sleep(3) # auto-scrolls when week view is entered, wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'down',
300, locator=calendar._week_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'up',
300, locator=calendar._week_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'right',
100, locator=calendar._week_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._week_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
calendar.tap_day_display_button()
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'down',
300, locator=calendar._day_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'up',
300, locator=calendar._day_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'right',
100, locator=calendar._day_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._day_view_locator)
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._day_view_locator)
time.sleep(1) # wait until scroll bar disappears
self.take_screenshot()
示例2: test_calendar_flick_through_months
# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import flick_to_next_month [as 别名]
def test_calendar_flick_through_months(self):
"""https://bugzilla.mozilla.org/show_bug.cgi?id=937085"""
MONTH_YEAR_PATTERN = '%b %Y'
calendar = Calendar(self.marionette)
calendar.launch()
calendar.flick_to_next_month()
self.assertEquals(self.next_month_year.strftime(MONTH_YEAR_PATTERN),
calendar.current_month_year)
calendar.flick_to_previous_month()
self.assertEquals(self.today.strftime(MONTH_YEAR_PATTERN), calendar.current_month_year)
示例3: test_calendar_flick
# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import flick_to_next_month [as 别名]
def test_calendar_flick(self):
"""https://bugzilla.mozilla.org/show_bug.cgi?id=937085"""
calendar = Calendar(self.marionette)
calendar.launch()
calendar.flick_to_next_month()
self.take_screenshot()
calendar.flick_to_previous_month()
self.take_screenshot()
calendar.flick_to_previous_month()
self.take_screenshot()
calendar.tap_week_display_button()
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'down',
300, locator=calendar._week_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'up',
300, locator=calendar._week_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'right',
100, locator=calendar._week_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._week_view_locator)
self.take_screenshot()
calendar.tap_day_display_button()
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'down',
300, locator=calendar._day_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'up',
300, locator=calendar._day_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'right',
100, locator=calendar._day_view_locator)
self.take_screenshot()
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._day_view_locator)
GaiaImageCompareTestCase.scroll(self.marionette, 'left',
100, locator=calendar._day_view_locator)
self.take_screenshot()