Example #1
0
class test_main(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        # Make sure bluetooth is not enabled before the tests starts
        self.data_layer.bluetooth_disable()
        self.wait_for_condition(lambda m: not self.data_layer.bluetooth_is_enabled,
                                timeout=20, message="Bluetooth disabled")

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

    def test_run(self):
        self.UTILS.statusbar.toggleViaStatusBar("bluetooth")
        self.marionette.switch_to_frame()
        self.UTILS.element.waitForElements(DOM.Statusbar.bluetooth, "Bluetooth icon in statusbar", True, 20, False)

        # Open settings and check bluetooth is on.
        self.settings.launch()

        bluetooth = self.UTILS.element.getElement(DOM.Settings.bluetooth, "Bluetooth")
        self.UTILS.element.scroll_into_view(bluetooth)
        time.sleep(3)

        bluetooth_description = self.UTILS.element.getElement(DOM.Settings.bluetooth_desc, "Bluetooth description")
        self.UTILS.test.test(bluetooth_description.text == _("No devices paired"), "Bluetooth is marked as turned on.")

        self.UTILS.statusbar.toggleViaStatusBar("bluetooth")
        self.marionette.switch_to_frame()
        self.UTILS.element.waitForNotElements(DOM.Statusbar.bluetooth, "Bluetooth icon in statusbar")
Example #2
0
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):
        self.settings.launch()

        self.UTILS.test.test(self.UTILS.network.is_network_type_enabled("airplane") == False,
                             "Airplane mode is disabled by default.")

        self.UTILS.reporting.logResult("info", "Turning airplane mode on ...")
        self.UTILS.test.test(True, "Getting airplane mode switch")
        x = self.UTILS.element.getElement(DOM.Settings.airplane_mode_switch, "Airplane mode switch")
        self.UTILS.test.test(True, "Airplane mode switch: {}".format(x))
        time.sleep(5)
        x.tap()

        self.UTILS.network.wait_for_network_item_enabled("airplane")

        self.UTILS.test.test(self.UTILS.network.is_network_type_enabled("airplane") == True,
                             "Airplane mode is now enabled.")
        self.UTILS.test.test(self.data_layer.get_setting('ril.radio.disabled') == True,
                             "Radio functionality is now disabled.")
Example #3
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)
        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")

        self.connect_to_network()

        self.target_name = "QA"
        self.test_contacts = [MockContact() for i in range(5)]
        self.test_contacts[0]["givenName"] = self.target_name
        self.test_contacts[0]["familyName"] = "Automation"
        map(self.UTILS.general.insertContact, self.test_contacts)

        # Clean start
        if not self.loop.is_installed():
            self.loop.install()
        else:
            self.loop.launch()
            # If already logged in, logout
            if not self.loop.wizard_or_login():
                self.loop.open_settings()
                self.loop.logout()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #4
0
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")))
Example #5
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.test_contact = MockContact()
        self.UTILS.general.insertContact(self.test_contact)

        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_message = _(
            "No problem! Just share the following link and they can call you back from"
            " any browser.")

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #6
0
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")))
Example #7
0
class test_main(GaiaTestCase):

    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):

        # Open the Settings application.
        self.settings.launch()

        # Tap hotspot.
        self.settings.hotspot()

        hotspot_settings = self.UTILS.element.getElement(DOM.Settings.hotspot_settings, "Hotspot settings")
        self.UTILS.test.test(hotspot_settings.is_enabled(),
                        "Hotspot settings are enabled by default (<b>meaning that 'hotspot' is off</b>).")
Example #8
0
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")
Example #9
0
class test_main(GaiaTestCase):
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.settings = Settings(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " +
                                        self.phone_number)

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

    def test_run(self):

        # Configure Auto Retrieve as "on_with_r = On with roaming option" from messaging settings
        self.settings.launch()
        self.settings.configure_mms_auto_retrieve("on_with_r")

        self.messages.create_and_send_mms("image", [self.phone_number],
                                          self.test_msg)
        self.messages.wait_for_message()

        # Verify that the MMS has been received.
        self.messages.verify_mms_received("img", self.phone_number)
Example #10
0
class test_main(GaiaTestCase):
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):
        self.settings.launch()

        self.UTILS.test.test(
            self.UTILS.network.is_network_type_enabled("airplane") == False,
            "Airplane mode is disabled by default.")

        self.UTILS.reporting.logResult("info", "Turning airplane mode on ...")
        self.UTILS.test.test(True, "Getting airplane mode switch")
        x = self.UTILS.element.getElement(DOM.Settings.airplane_mode_switch,
                                          "Airplane mode switch")
        self.UTILS.test.test(True, "Airplane mode switch: {}".format(x))
        time.sleep(5)
        x.tap()

        self.UTILS.network.wait_for_network_item_enabled("airplane")

        self.UTILS.test.test(
            self.UTILS.network.is_network_type_enabled("airplane") == True,
            "Airplane mode is now enabled.")
        self.UTILS.test.test(
            self.data_layer.get_setting('ril.radio.disabled') == True,
            "Radio functionality is now disabled.")
Example #11
0
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.settings = Settings(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)

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

    def test_run(self):

        # Configure Auto Retrieve as "on_with_r = On with roaming option" from messaging settings
        self.settings.launch()
        self.settings.configure_mms_auto_retrieve("on_with_r")

        self.messages.create_and_send_mms("image", [self.phone_number], self.test_msg)
        self.messages.wait_for_message()

        # Verify that the MMS has been received.
        self.messages.verify_mms_received("img", self.phone_number)
Example #12
0
    def setUp(self):

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

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
Example #13
0
class test_main(GaiaTestCase):
    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):

        # Open the Settings application.
        self.settings.launch()

        # Tap hotspot.
        self.settings.hotspot()

        hotspot_settings = self.UTILS.element.getElement(
            DOM.Settings.hotspot_settings, "Hotspot settings")
        self.UTILS.test.test(
            hotspot_settings.is_enabled(),
            "Hotspot settings are enabled by default (<b>meaning that 'hotspot' is off</b>)."
        )
Example #14
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.scenario = "scenarios/urls/multiple/available/diff_day/idb"
        self.aux_files_dir = self.UTILS.general.get_config_variable("aux_files", "loop")
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
        self.connect_to_network()

        # Insert our test contacts
        number_of_contacts = 3
        contact_given = "Test"
        contact_family = map(str, range(1, number_of_contacts + 1))
        contact_name = ["{} {}".format(contact_given, contact_family[i])
                        for i in range(number_of_contacts)]
        contact_numbers = ["666666666666", "777777777777", "888888888888"]

        test_contacts = [MockContact(name=contact_name[i], givenName=contact_given,
                                     familyName=contact_family[i],
                                     tel={'type': 'Mobile', 'value': contact_numbers[i]})
                         for i in range(number_of_contacts)]
        map(self.UTILS.general.insertContact, test_contacts)

        self.loop.initial_test_checks()

        # Make sure we're not logged in FxA
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
Example #15
0
    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 = "GOSPEL.mp3"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.UTILS.statusbar.clearAllStatusBarNotifs()

        # Download and audio file
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        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)
        self.apps.kill_all()
        time.sleep(2)
Example #16
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.clock = Clock(self)
        self.settings = Settings(self)
Example #17
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
Example #18
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.fxa_user_1 = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass_1 = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")
        self.connect_to_network()

        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()

        if self.settings.is_fxa_logged_in():
            self.settings.fxa_log_out()
        self.settings.fxa_log_in(self.fxa_user_1, self.fxa_pass_1)

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

        # First, login with the first fxa
        self.loop.launch()
        result = self.loop.wizard_or_login()

        if result:
            self.loop.tap_on_firefox_login_button()

            self.UTILS.element.waitForElements(DOM.Loop.app_header,
                                               "Loop main view")
            self.loop.open_settings()
            self.loop.logout()
Example #19
0
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)
Example #20
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)
        self.test_contact = MockContact()
        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")

        self.test_contact["givenName"] = "This is a very looooooooooooong name"
        self.test_contact["familyName"] = "Test"
        self.test_contact["name"] = "{} {}".format(
            self.test_contact["givenName"], self.test_contact["familyName"])

        self.UTILS.general.insertContact(self.test_contact)

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #21
0
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)

        # 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)

        is_there = self.UTILS.statusbar.isIconInStatusBar(DOM.Statusbar.downloads)
        self.UTILS.test.test(is_there, "Verify that the download icon in status bar is active")
Example #22
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)
        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")

        self.target_name = "QA"
        self.test_contacts = [MockContact() for i in range(3)]
        self.test_contacts[0]["givenName"] = self.target_name
        self.test_contacts[0]["familyName"] = "Automation"
        self.test_contacts[0]["name"] = "{} {}".format(
            self.test_contacts[0]["givenName"],
            self.test_contacts[0]["familyName"])
        map(self.UTILS.general.insertContact, self.test_contacts)

        self.contacts.launch()
        self._add_contact_as_favorite(self.test_contacts[0])

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #23
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)
        self.test_contact = MockContact()
        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")

        self.connect_to_network()
        self.UTILS.general.insertContact(self.test_contact)
        # Clean start
        if not self.loop.is_installed():
            self.loop.install()
        else:
            self.loop.launch()
            # If already logged in, logout
            if not self.loop.wizard_or_login():
                self.loop.open_settings()
                self.loop.logout()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #24
0
    def setUp(self):

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

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        _ = setup_translations(self)
Example #25
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        self.Browser = Browser(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
Example #26
0
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.clock = Clock(self)
        self.settings = Settings(self)

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

    def test_run(self):

        # Set the volume to be low (no need to wake up the office! ;o)
        self.settings.set_alarm_volume(0)

        # Launch clock app.
        self.clock.launch()

        # Delete all previous alarms.
        #
        self.clock.delete_all_alarms()

        # Create an alarm that is 1 minute in the future.
        # (Make sure we're not about to do this at the end of a minute or an hour.)
        #
        now_mins = time.strftime("%M", time.gmtime())
        diff_m = 60 - int(now_mins)
        if diff_m <= 1:
            time.sleep(60)

        now_secs = time.strftime("%S", time.gmtime())
        diff_s = 60 - int(now_secs)
        if diff_s <= 15:
            time.sleep(diff_s)

        t = datetime.datetime.now() + datetime.timedelta(minutes=1)

        title = "Test alarm"
        self.clock.create_alarm(t.hour, t.minute, title)
        """
        Return to the main screen (since this is where the user will
        most likely be when the alarm goes off).
        """

        self.UTILS.home.goHome()

        # Check the statusbar icon exists.
        self.UTILS.test.test(self.clock.checkStatusbarIcon(), "Alarm icon is present in statusbar.")

        # Wait for the alarm to start.
        self.clock.checkAlarmRingDetails(t.hour, t.minute, title)
Example #27
0
class test_main(GaiaTestCase):
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.clock = Clock(self)
        self.settings = Settings(self)

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

    def test_run(self):

        # Set the volume to be low (no need to wake up the office! ;o)
        self.settings.set_alarm_volume(0)

        # Launch clock app.
        self.clock.launch()

        # Delete all previous alarms.
        #
        self.clock.delete_all_alarms()

        # Create an alarm that is 1 minute in the future.
        # (Make sure we're not about to do this at the end of a minute or an hour.)
        #
        now_mins = time.strftime("%M", time.gmtime())
        diff_m = 60 - int(now_mins)
        if diff_m <= 1:
            time.sleep(60)

        now_secs = time.strftime("%S", time.gmtime())
        diff_s = 60 - int(now_secs)
        if diff_s <= 15:
            time.sleep(diff_s)

        t = datetime.datetime.now() + datetime.timedelta(minutes=1)

        title = "Test alarm"
        self.clock.create_alarm(t.hour, t.minute, title)
        """
        Return to the main screen (since this is where the user will
        most likely be when the alarm goes off).
        """

        self.UTILS.home.goHome()

        # Check the statusbar icon exists.
        self.UTILS.test.test(self.clock.checkStatusbarIcon(),
                             "Alarm icon is present in statusbar.")

        # Wait for the alarm to start.
        self.clock.checkAlarmRingDetails(t.hour, t.minute, title)
Example #28
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        # Make sure bluetooth is not enabled before the tests starts
        self.data_layer.bluetooth_disable()
        self.wait_for_condition(
            lambda m: not self.data_layer.bluetooth_is_enabled,
            timeout=20,
            message="Bluetooth disabled")
Example #29
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")

        self.connect_to_network()

        self.loop.initial_test_checks()
        self._do_fxa_logout()
Example #30
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.settings = Settings(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()
Example #31
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.fxa_user = self.UTILS.general.get_os_variable("GLOBAL_FXA_USER")
        self.fxa_pass = self.UTILS.general.get_os_variable("GLOBAL_FXA_PASS")
        self.data_layer.connect_to_cell_data()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #32
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.connect_to_network()

        self.loop.initial_test_checks()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #33
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)
        self.test_contact = MockContact()
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")

        self.connect_to_network()
        self.UTILS.general.insertContact(self.test_contact)
        # Clean start
        if not self.loop.is_installed():
            self.loop.install()
        else:
            self.loop.launch()
            # If already logged in, logout
            if not self.loop.wizard_or_login():
                self.loop.open_settings()
                self.loop.logout()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #34
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.clock = Clock(self)
        self.settings = Settings(self)
Example #35
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")

        self.connect_to_network()

        self.target_name = "QA"
        self.test_contacts = [MockContact() for i in range(5)]
        self.test_contacts[0]["givenName"] = self.target_name
        self.test_contacts[0]["familyName"] = "Automation"
        map(self.UTILS.general.insertContact, self.test_contacts)

        # Clean start
        if not self.loop.is_installed():
            self.loop.install()
        else:
            self.loop.launch()
            # If already logged in, logout
            if not self.loop.wizard_or_login():
                self.loop.open_settings()
                self.loop.logout()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #36
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.browser = Browser(self)
        self.settings = Settings(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
        self.data_layer.connect_to_wifi()
        self.data_layer.is_wifi_connected()

        self.apps.kill_all()
        self.url = "http://jaoo.github.io/service-worker-testing/index.html"
        self.sw_scope = "http://jaoo.es/service-worker-testing/"
        self.sw_header = "http://jaoo.es!appId=22&inBrowser=1"
        self.script_spec = "http://jaoo.es/service-worker-testing/service.js"
Example #37
0
    def setUpEmail(self):

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

        self.email = Email(self)
        self.settings = Settings(self)
        self.browser = Browser(self)

        _ = setup_translations(self)

        # Create (and record) a unique 'subject'.
        self.subject = "test " + str(time.time())
        self.body = "This is the test email body."

        # Set up specific folder names.
        if "gmail" in self.test_type:
            self.UTILS.reporting.logComment("Gmail account being used.")
            self.sent_folder_name = _("Sent Mail")
        elif "exchange" in self.test_type:
            self.UTILS.reporting.logComment("Exchange account being used.")
            self.sent_folder_name = _("Sent Items")
        else:
            self.UTILS.reporting.logComment("Non-gmail account being used.")
            self.sent_folder_name = _("Sent")

        self.marionette.set_search_timeout(50)
Example #38
0
    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()
Example #39
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.fxa_user_1 = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass_1 = self.UTILS.general.get_config_variable("fxa_pass", "common")
        self.connect_to_network()

        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()

        if self.settings.is_fxa_logged_in():
            self.settings.fxa_log_out()
        self.settings.fxa_log_in(self.fxa_user_1, self.fxa_pass_1)

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

        # First, login with the first fxa
        self.loop.launch()
        result = self.loop.wizard_or_login()

        if result:
            self.loop.tap_on_firefox_login_button()

            self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
            self.loop.open_settings()
            self.loop.logout()
Example #40
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")

        self.target_name = "QA"
        self.test_contacts = [MockContact() for i in range(3)]
        self.test_contacts[0]["givenName"] = self.target_name
        self.test_contacts[0]["familyName"] = "Automation"
        self.test_contacts[0]["name"] = "{} {}".format(
            self.test_contacts[0]["givenName"], self.test_contacts[0]["familyName"])
        map(self.UTILS.general.insertContact, self.test_contacts)
    
        self.contacts.launch()
        self._add_contact_as_favorite(self.test_contacts[0])

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #41
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)

        self.test_contact = MockContact(givenName="QA", familyName="Automation")
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_msg = _("This contact does not have either a phone number or an email address.")

        self.contacts.launch()
        self.contacts.start_create_new_contact()
        cont_fields = self.contacts.get_contact_fields()
        self.contacts.replace_str(cont_fields['givenName'], self.test_contact['givenName'])
        self.contacts.replace_str(cont_fields['familyName'], self.test_contact['familyName'])
        done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
        done_button.tap()

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Example #42
0
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))
Example #43
0
    def setUp(self):

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

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        _ = setup_translations(self)
Example #44
0
    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()
Example #45
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        # Make sure bluetooth is not enabled before the tests starts
        self.data_layer.bluetooth_disable()
        self.wait_for_condition(lambda m: not self.data_layer.bluetooth_is_enabled,
                                timeout=20, message="Bluetooth disabled")
Example #46
0
class test_main(GaiaTestCase):

    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")

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

    def test_run(self):
        self.data_layer.disable_wifi()
        self.UTILS.element.waitForNotElements(DOM.Statusbar.wifi, "Wifi icon in statusbar")
        self.UTILS.test.test(not self.UTILS.network.is_network_type_enabled("wifi"),
                         "Wifi is disabled before we start this test.")

        self.UTILS.statusbar.toggleViaStatusBar("wifi")
        # If required, connect to the wifi.
        self.marionette.switch_to_frame()
        try:
            self.wait_for_element_present("xpath", "//iframe[contains(@{},'{}')]".\
                                        format(DOM.Settings.frame_locator[0], DOM.Settings.frame_locator[1]),
                                        timeout=10)

            # We need to supply the login details for the network.
            self.UTILS.iframe.switchToFrame(*DOM.Settings.frame_locator)
            self.settings.connect_to_wifi(self.wifi_name, self.wifi_pass)
            self.marionette.switch_to_frame()
        except:
            pass

        self.UTILS.element.waitForElements(DOM.Statusbar.wifi, "Wifi icon in statusbar", timeout=20)
        self.UTILS.statusbar.toggleViaStatusBar("wifi")
        self.UTILS.element.waitForNotElements(DOM.Statusbar.wifi, "Wifi icon in statusbar", timeout=20)
Example #47
0
class test_main(GaiaTestCase):

    # Restart device to starting with wifi and 3g disabled.
    #
    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.settings = Settings(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()

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

    def test_run(self):
        self.UTILS.general.connect_to_cell_data()
        self.data_layer.connect_to_wifi()

        # Configure Auto Retrieve as off from messaging settings
        self.settings.launch()
        self.settings.configure_mms_auto_retrieve("on_without_r")

        self.messages.create_and_send_mms("image", [self.phone_number], self.test_msg)
        self.messages.wait_for_message()

        # Verify that the MMS has been received, but it contains no attached file
        self.messages.verify_mms_received("img", self.phone_number)
Example #48
0
class test_main(GaiaTestCase):

    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)
        
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):
        self.UTILS.network.disableAllNetworkSettings()

        self.UTILS.test.test(self.UTILS.network.is_network_type_enabled("data") == False, "Data conn is disabled.")

        self.settings.launch()
        time.sleep(1)
        self.settings.cellular_and_data()

        data_switch = self.UTILS.element.getElement(DOM.Settings.celldata_DataConn_switch, "Data connection switch")
        data_switch.tap()

        # Wait for confirmation screen
        self.settings.confirm_data_conn()

        self.UTILS.network.wait_for_network_item_enabled("data")

        self.UTILS.test.test(self.UTILS.network.is_network_type_enabled("data") == True, "Data conn is now enabled.")
Example #49
0
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)

        # 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)

        is_there = self.UTILS.statusbar.isIconInStatusBar(DOM.Statusbar.downloads)
        self.UTILS.test.test(is_there, "Verify that the download icon in status bar is active")

        self.UTILS.statusbar.wait_for_notification_toaster_title("Download complete", timeout=120)

        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")
Example #50
0
class test_main(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

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

    def test_run(self):
        self.settings.launch()
        self.settings.wifi()
        self.settings.wifi_switch_on()

        available_networks = self.UTILS.element.getElements(
            DOM.Settings.wifi_available_networks, "Available networks", False)
        self.UTILS.reporting.logResult("info", "Found {} networks".format(len(available_networks)))

        for network in available_networks:
            network_name = network.find_element(*("css selector", "span")).text
            try:
                network.find_element(*("css selector", "aside.secured"))
                network.find_element(*("css selector", "small[data-l10n-id='securedBy']"))
                self.UTILS.reporting.logResult('info', "Network [{}] is secured".format(network_name))
            except:
                self.UTILS.reporting.logResult('info', "Network [{}] is NOT secured".format(network_name))
Example #51
0
class test_main(GaiaTestCase):

    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")

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

    def test_run(self):
        self.settings.launch()
        time.sleep(1)
        self.settings.wifi()
        self.settings.connect_to_wifi(self.wifi_name, self.wifi_pass)

        self.UTILS.test.test(self.UTILS.network.is_network_type_enabled("wifi") == True, "Wifi mode is now enabled.")
Example #52
0
class test_main(GaiaTestCase):

    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        self.browser = Browser(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")

        self.testURL = self.UTILS.general.get_config_variable("test_url", "common")
        self.apps.set_permission_by_url(Browser.search_manifest_url, 'geolocation', 'deny')

        # switch off keyboard FTU screen
        self.data_layer.set_setting("keyboard.ftu.enabled", False)

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

    def test_run(self):

        # Open the settings application.
        self.settings.launch()

        # Connect to the wifi.
        self.settings.wifi()
        self.settings.connect_to_wifi(self.wifi_name, self.wifi_pass)

        # Open the browser app.
        self.browser.launch()
        # Open our URL.
        self.browser.open_url(self.testURL)
Example #53
0
class main(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.connect_to_network()

        self.loop.initial_test_checks()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)

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

    def test_run(self):
        self.loop.launch()
        result = self.loop.wizard_or_login()

        if result:
            self.loop.phone_login()
            self.loop.allow_permission_phone_login()
            self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
class test_main(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.browser = Browser(self)
        self.settings = Settings(self)

        self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
        self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
        self.data_layer.connect_to_wifi()
        self.data_layer.is_wifi_connected()

        self.apps.kill_all()
        self.url = "https://acperez.github.io/gecko-sw-test/"
        self.sw_scope = "https://acperez.github.io/gecko-sw-test/"
        self.sw_header = "https://acperez.github.io!appId=22&inBrowser=1"
        self.script_spec = "https://acperez.github.io/gecko-sw-test/service-worker.js"

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

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

        register_btn = self.UTILS.element.getElement(dom.acperez_register_btn_dom, "Register Worker button")
        register_btn.tap()

        self.settings.launch()
        time.sleep(2)
        self.settings.developer_settings()
        time.sleep(2)
        self.settings.service_workers_menu()

        div_dom = (DOM.Settings.service_worker_div[0], DOM.Settings.service_worker_div[1].format(self.sw_scope))
        div_elem = self.UTILS.element.getElement(div_dom, "Service worker div")
        self.UTILS.element.scroll_into_view(div_elem)

        header = div_elem.find_element(*DOM.Settings.service_worker_header)
        self.UTILS.test.test(header.text == self.sw_header, "Header found [{}] Expected [{}]".
                             format(header.text, self.sw_header))

        scope = div_elem.find_element(*DOM.Settings.service_worker_scope)
        self.UTILS.test.test(self.sw_scope == scope.text, "Scope found [{}] Expected [{}]".
                             format(scope.text, self.sw_scope))

        script_spec = div_elem.find_element(*DOM.Settings.service_worker_script_spec)
        self.UTILS.test.test(self.script_spec == script_spec.text, "Script spec found [{}] Expected [{}]".
                             format(script_spec.text, self.script_spec))

        worker_url = div_elem.find_element(*DOM.Settings.service_worker_current_url)
        self.UTILS.test.test(self.script_spec == worker_url.text, "URL found [{}] Expected [{}]".
                             format(worker_url.text, self.script_spec))

        unregister_btn = div_elem.find_element(*DOM.Settings.service_worker_unregister_btn)
        unregister_btn.tap()