本文整理匯總了Python中gaiatest.GaiaEnduranceTestCase類的典型用法代碼示例。如果您正苦於以下問題:Python GaiaEnduranceTestCase類的具體用法?Python GaiaEnduranceTestCase怎麽用?Python GaiaEnduranceTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GaiaEnduranceTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Want wifi only
self.data_layer.disable_cell_data()
self.data_layer.enable_wifi()
self.data_layer.connect_to_wifi(self.testvars['wifi'])
示例2: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# add track to storage
self.push_resource("MUS_0001.mp3")
# launch the Music application
self.app = self.apps.launch("music")
# wait for music tiles to appear as indication of indexing
self.wait_for_element_displayed(*self._album_tile_locator, timeout=60)
# switch to albums view
tab_albums = self.marionette.find_element(*self._tab_albums_locator)
tab_albums.tap()
# wait for it to switch into list mode
self.wait_for_element_present(*self._body_list_mode_locator)
# check that albums (at least one) are available
self.wait_for_element_present(*self._album_list_locator)
albums = self.marionette.find_elements(*self._album_list_locator)
self.assertGreater(len(albums), 0, "no albums found")
# select an album
album_list = self.marionette.find_element(*self._album_list_locator)
album_list.tap()
示例3: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
self.apps.set_permission_by_url(Search.manifest_url, 'geolocation', 'deny')
# Want cell network only
self.data_layer.disable_wifi()
self.data_layer.connect_to_cell_data()
示例4: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# delete any existing SMS messages to start clean
self.data_layer.delete_all_sms()
# launch the app
self.messages = Messages(self.marionette)
self.messages.launch()
示例5: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Set video record duration
self.duration = 7
self.marionette.log("Video capture duration is " + str(self.duration) + " seconds")
# Turn off geolocation prompt
self.apps.set_permission('Camera', 'geolocation', 'deny')
示例6: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Remove any existing contacts
self.data_layer.remove_all_contacts(60000)
# Launch the Contacts app
self.contacts = Contacts(self.marionette)
self.contacts.launch()
示例7: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Turn off geolocation prompt
self.apps.set_permission('Camera', 'geolocation', 'deny')
# add photo to storage
self.push_resource('IMG_0001.jpg')
self.gallery = Gallery(self.marionette)
self.gallery.launch()
self.gallery.wait_for_files_to_load(1)
示例8: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Launch the Clock app
self.clock = Clock(self.marionette)
self.clock.launch()
# Bug 864945, UI is not updating unless restart the app
self.app_under_test = "clock"
self.close_app()
time.sleep(2)
self.clock.launch()
self.initial_alarms_count = len(self.clock.alarms)
示例9: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Add photos to storage.
self.push_resource(self.images, count=self.image_count)
# Start gallery app
self.gallery = Gallery(self.marionette)
self.gallery.launch()
self.gallery.wait_for_files_to_load(self.image_count)
self.assertTrue(self.gallery.gallery_items_number >= self.image_count)
# Tap first image to open full screen view.
self.image = self.gallery.tap_first_gallery_item()
示例10: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# launch the FM Radio app
self.fm_radio = FmRadio(self.marionette)
self.fm_radio.launch()
# check the headphone is plugged-in or not
self.assertTrue(self.data_layer.is_antenna_available, 'Antenna (headphones) not plugged in')
# wait for the radio start-up
self.wait_for_condition(lambda m: self.data_layer.is_fm_radio_enabled)
# stay on initial station for a few seconds
time.sleep(5)
示例11: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# delete any existing SMS messages to start clean
self.data_layer.delete_all_sms()
# temporary workaround for bug 837029: launch and then kill messages
# app, to clear any left-over sms msg notifications
self.app = self.apps.launch('Messages', False)
time.sleep(2)
self.apps.kill(self.app)
time.sleep(2)
# launch the app
self.app = self.apps.launch('Messages')
示例12: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Setting the system time to a hardcoded datetime to avoid timezone issues
# Jan. 1, 2013, according to http://www.epochconverter.com/
_seconds_since_epoch = 1357043430
self.today = datetime.datetime.utcfromtimestamp(_seconds_since_epoch)
# set the system date to an expected date, and timezone to UTC
self.data_layer.set_time(_seconds_since_epoch * 1000)
self.data_layer.set_setting('time.timezone', 'Atlantic/Reykjavik')
# Starting event
self.next_event_date = self.today
# launch the Calendar app
self.app = self.apps.launch('calendar')
示例13: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Connect wifi
self.data_layer.enable_wifi()
self.data_layer.connect_to_wifi(self.testvars['wifi'])
示例14: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Turn off geolocation prompt
self.apps.set_permission('Camera', 'geolocation', 'deny')
示例15: setUp
def setUp(self):
GaiaEnduranceTestCase.setUp(self)
# Launch several apps and minimize them in the background
self.launch_app_and_minimize()