def test02_001_DefaultSettings_Search(self):
     '''
     :Test Cases:
     - Check if you can open the Settings Menu.
     - Check Default Setting for Search Results For.
     - Check Default Setting for Block Explicit Content.
     - Check Default Setting for Human Web.
     - Check Default Setting for Enable Autocompletion.
     - Check Default Setting for Quick Search.
     - Check Default Setting for Complementary Search.
     :return:
     '''
     self.log("Check 'Default Settings'.", "testsuite")
     PFT = FreshTab(self.settings)
     PSM = Settings(self.settings)
     PFT.disableAddressBar()
     if self.isPlatform('ios'):
         PFT.enableAddressBar()
     PFT.goToSettings()
     self.assertIsEqual(PSM.isSettingsMenu(), True,
                        "Check if you can open the Settings Menu.")
     if self.isPlatform('android'): PSM.openOrClickSetting("general")
     self.sleep(1)
     self.assertIsIn(
         PSM.getStatusValueForSetting('searchResultsFor')['summary'],
         PSM.getDefaultForSetting('searchResultsFor'),
         "Check Default Setting for Search Results For.")
     self.assertIsEqual(
         PSM.getStatusValueForSetting('blockExplicitContent')['switch'],
         PSM.getDefaultForSetting('blockExplicitContent'),
         "Check Default Setting for Block Explicit Content.")
     if self.isPlatform('ios'):
         self.assertIsEqual(
             PSM.getStatusValueForSetting('humanWeb')['summary'],
             PSM.getDefaultForSetting('humanWeb'),
             "Check Default Setting for Human Web.")
     else:
         self.assertIsEqual(
             PSM.getStatusValueForSetting('enableAutocompletion')['switch'],
             PSM.getDefaultForSetting('enableAutocompletion'),
             "Check Default Setting for Enable Autocompletion.")
     self.assertIsEqual(
         PSM.getStatusValueForSetting('quickSearch')['switch'],
         PSM.getDefaultForSetting('quickSearch'),
         "Check Default Setting for Quick Search.")
     self.assertIsEqual(
         PSM.getStatusValueForSetting('complementarySearch')['summary'],
         PSM.getDefaultForSetting('complementarySearch'),
         "Check Default Setting for Complementary Search.",
         skipIf="android",
         skipMessage="No Default Complementary Search for Android.")
     PSM.goOutOfSettings()
Ejemplo n.º 2
0
 def test01_003_CheckAddressBar(self):
     '''
     :Test Cases:
     - Check if Address Bar exists.
     - Check Address Bar Pretext.
     - Check Address Bar updates correctly.
     - Check Address Bar updates correctly again.
     - Check URL Bar exists and has Pretext.
     - Check if Reader Mode is on FreshTab.
     :return:
     '''
     self.log("Check 'Address Bar Functionality'.", "testsuite")
     PFT = FreshTab(self.settings)
     addressBar = PFT.enableAddressBar()
     self.assertNotEqual(addressBar, None, "Check if Address Bar exists.")
     self.assertIsEqual(addressBar.text, "Search or enter address",
                        "Check Address Bar Pretext.")
     addressBar.set_value("www.google.de")
     self.assertIsEqual(addressBar.text, "www.google.de",
                        "Check Address Bar updates correctly.")
     addressBar.clear()
     addressBar.set_value("www.google.de")
     self.assertIsEqual(addressBar.text, "www.google.de",
                        "Check Address Bar updates correctly again.")
     PFT.clearAndCancelAddressBar()
     self.assertIsEqual(PFT.getURLBar().text, "Search or enter address",
                        "Check URL Bar exists and has Pretext.")
     self.assertIsEqual(PFT.getReaderModeButton(), None,
                        "Check if Reader Mode is on FreshTab.")