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


Python Settings.downloads方法代码示例

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


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

示例1: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.video = Video(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "clipcanvas_14348_H264_320x180.mp4"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
    
        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=120)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:33,代码来源:test_33941.py

示例2: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        _ = setup_translations(self)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        # Verify no downloads are present
        no_downloads = self.UTILS.element.getElement(
            DOM.DownloadManager.download_empty_list_content, "Getting empty list content")
        self.UTILS.test.test(no_downloads.text == _("No downloads"),
                             "Verifying '{}' message is displayed".format(_("No downloads")))
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:29,代码来源:test_33931.py

示例3: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.settings.launch()
        self.settings.downloads()

        edit_mode = self.UTILS.element.getElement(DOM.DownloadManager.download_edit_button,
                                                  "Download edit button", True, 10)
        self.UTILS.test.TEST(edit_mode.get_attribute("class") == "disabled", "Edit mode button is disabled")

        edit_mode.tap()
        self.UTILS.element.waitForNotElements(DOM.DownloadManager.downloads_edit_header_title,
                                           "Edit downloads header")
开发者ID:owdqa,项目名称:OWD_TEST_TOOLKIT,代码行数:29,代码来源:test_88888.py

示例4: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    button_locator = ('css selector', "button.icon")

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)

        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "clipcanvas_14348_H264_320x180.mp4"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        self.apps.kill_all()
        time.sleep(2)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
    
        self.browser.launch()
        self.browser.open_url(self.test_url)

        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(3)

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)

        share_option = self.UTILS.element.getElement(DOM.DownloadManager.download_file_option_share,
                                                     "Getting Share option button")
        share_option.tap()

        self.marionette.switch_to_frame()
        share_menu = self.UTILS.element.getElement(DOM.GLOBAL.action_menu, "Share menu")
        options = share_menu.find_elements(*self.button_locator)
        self.UTILS.test.test(len(options) > 0, "A list with several options to share is shown")

        self._show_option(options)

    def _show_option(self, options):
        for option in options:
            self.UTILS.reporting.logResult('info', "Share option: {}".format(option.text))
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:59,代码来源:test_32238.py

示例5: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "41MB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.data_layer.connect_to_cell_data()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.browser.launch()
        self.browser.open_url(self.test_url)

        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title(text="Download started", notif_text="Downloading", timeout=15)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()

        # Verify status downloading using data-state="downloading".
        self.download_manager.verify_download_status(self.data_url, "downloading")
        self.download_manager.verify_download_graphical_status(self.data_url, "downloading")

        self.UTILS.home.touchHomeButton()

        self.UTILS.statusbar.displayStatusBar()
        self.UTILS.statusbar.wait_for_notification_statusbar_title("Downloading")
        self.UTILS.statusbar.hideStatusBar()

        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=240)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:51,代码来源:test_33947.py

示例6: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "1GB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        # make the download process slower
        self.data_layer.connect_to_cell_data()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title(text="Download started", notif_text="Downloading",
                                                                 timeout=15)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()

        # Verify status downloading using data-state="downloading".
        self.download_manager.verify_download_status(self.data_url, "downloading")
        download_info = self.download_manager.get_download_info(self.data_url)

        match = re.search(r"(\d)+(.(\d)+)*\s(GB|MB|KB)\sof\s(\d)+(.(\d)+)*\sGB$", download_info.text)
        self.UTILS.test.test(match is not None, "Verify the the text is: 'X' GB of 'Y' GB")

        time.sleep(3)
        self.download_manager.stop_download(self.data_url, True)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:51,代码来源:test_33949.py

示例7: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "11MB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        self.browser.launch()
        self.browser.open_url(self.test_url)

        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)
        previous_number_of_pictures = len(self.data_layer.sdcard_files())

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)
        self.download_manager.open_download_delete_file()

        elem = (DOM.DownloadManager.download_element[0],
                DOM.DownloadManager.download_element[1].format(self.data_url))
        self.UTILS.element.waitForNotElements(elem, "Download is not there")

        # Check that picture saved to SD card
        self.wait_for_condition(
            lambda m: len(self.data_layer.sdcard_files()) == previous_number_of_pictures - 1, 20)
        self.assertEqual(len(self.data_layer.sdcard_files()), previous_number_of_pictures - 1)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:51,代码来源:test_33916.py

示例8: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "105MB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        # make the download process slower
        self.data_layer.connect_to_cell_data()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title(text="Download started", notif_text="Downloading", timeout=15)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()

        # Verify status downloading using data-state="downloading".
        self.download_manager.verify_download_status(self.data_url, "downloading")
        self.download_manager.verify_download_graphical_status(self.data_url, "downloading")

        self.download_manager.stop_download(self.data_url, True)

        is_there = self.UTILS.statusbar.isIconInStatusBar(DOM.Statusbar.downloads)

        self.UTILS.test.test(not is_there, "Verify that the download icon in status bar is dismissed")
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:50,代码来源:test_33937.py

示例9: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "Crazy_Horse.jpg"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)
        self.download_manager.tap_on_open_option()

        # Verify that the image is opened.
        self.UTILS.iframe.switchToFrame(*DOM.Gallery.frame_locator)
        title = self.UTILS.element.getElement(DOM.Gallery.file_name_header, "File name header")
        self.UTILS.test.test(title.text == self.file_name, "File name matches in Gallery")

        is_loaded = self.UTILS.element.waitForElements(DOM.Gallery.current_image_pic,
                                                       "Waiting for image to be loaded")
        self.UTILS.test.test(is_loaded, "Image has been loaded")
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:50,代码来源:test_33915.py

示例10: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        # Specific for this test.
        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.testURL = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_names = ["Toast.doc", "Porridge.doc"]

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        self.apps.kill_all()
        time.sleep(2)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        self.browser.launch()
        self.browser.open_url(self.testURL)

        map(self.download_manager.download_file, self.file_names)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        previous_number_of_pictures = len(self.data_layer.sdcard_files())
        self.settings.launch()
        self.settings.downloads()

        # Delete All downloads
        self.download_manager.delete_all_downloads()

        # Check that picture saved to SD card
        self.wait_for_condition(
            lambda m: len(self.data_layer.sdcard_files()) == previous_number_of_pictures - len(self.file_names), 20)
        self.assertEqual(len(self.data_layer.sdcard_files()), previous_number_of_pictures - len(self.file_names))
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:49,代码来源:test_33908.py

示例11: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.music = Music(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "GOSPEL.mp3"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)
        self.download_manager.tap_on_open_option()

        self.UTILS.iframe.switchToFrame(*DOM.Music.frame_locator)
        time.sleep(5)

        title = self.UTILS.element.getElement(DOM.Music.title_song, "Getting song title in music player")
        self.UTILS.test.test(title.text in self.file_name, "Mp3 file title")

        self.UTILS.test.test(self.music.is_player_playing(), "Mp3 file is being played")
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:48,代码来源:test_33914.py

示例12: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.video = Video(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "clipcanvas_14348_H264_320x180.mp4"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
    
        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)
        self.download_manager.tap_on_open_option()

        # Verifying video player
        self.UTILS.iframe.switchToFrame(*DOM.Video.frame_locator)
        result = self.video.is_this_video_being_played(self.file_name)
        self.UTILS.test.test(result, "This video [{}] is actually being played".format(self.file_name))
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:47,代码来源:test_33918.py

示例13: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "prueba_archivo_con_nombre_muy_largo_de_30MB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
    
        self.browser.launch()
        self.browser.open_url(self.test_url)
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()

        # Check the file is there
        entry_name = self.download_manager.get_download_entry(self.data_url).find_element(*('css selector', 'p.fileName'))
        value = self.UTILS.element.get_css_value(entry_name, "text-overflow")
        is_ellipsis = self.UTILS.element.is_ellipsis_active(entry_name)

        self.UTILS.test.test(value == "ellipsis" and is_ellipsis,
                             "Download list shows ellipsis(...) for a long entry [{}]".format(self.file_name))
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:47,代码来源:test_33934.py

示例14: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "11MB.rar"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
 
        self.browser.launch()
        self.browser.open_url(self.test_url)

   
        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.apps.kill_all()
        time.sleep(2)

        self.settings.launch()
        self.settings.downloads()
        self.download_manager.open_download(self.data_url)
        self.download_manager.open_download_keep_file()

        elem = (DOM.DownloadManager.download_element[0],
                DOM.DownloadManager.download_element[1].format(self.data_url))
        self.UTILS.element.waitForElements(elem, "Download is still there")
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:46,代码来源:test_33913.py

示例15: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import downloads [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        # Specific for this test.
        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_name = "Crazy_Horse.jpg"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        self.apps.kill_all()
        time.sleep(2)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
    
        self.browser.launch()
        self.browser.open_url(self.test_url)

        self.download_manager.download_file(self.file_name)
        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=60)
        time.sleep(5)

        self.settings.launch()
        self.settings.downloads()

        self.download_manager.verify_download_status(self.data_url, "succeeded")
        self.download_manager.delete_download(self.data_url)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:44,代码来源:test_33905.py


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