コード例 #1
0
    def test_Client_Logo_verify(self):
        home_page = HomePage(self.webdriver, self.config)
        img_src = home_page.verifySideBarClients()
        img_id = img_src.split('.jpg')[0]
        print(img_id)

        self.assertEqual(
            img_id,
            "https://s3.amazonaws.com/ssowrapper.dev/images/client_img_83e954a0-78a4-11e8-a162-0a3a7fe15bce",
            "Client logo source not matching")
コード例 #2
0
 def test_sidebarjson(self):
     path = os.path.join('testdata', 'sidebar.json')
     print("location:" + path)
     home_page = HomePage(self.webdriver, self.config)
     with open(path) as file:
         data = json.load(file)
     for item in range(len(data)):
         link = data[item]["link"]
         try:
             home_page.openSideBar()
             sleep(10)
             WebDriverWait(self.webdriver, 30).until(
                 EC.visibility_of_element_located((By.XPATH, "//span[text()='"+ link +"']"))).click()
             sleep(5)
         except:
             print("Side bar link:\""+ link+" \"not found")
             self.webdriver.refresh()
コード例 #3
0
    def test_setting_single_client_selection(self):
        home_page = HomePage(self.webdriver, self.config)
        home_page.verifySettingsLink()

        settings_page = SettingsPage(self.webdriver, self.config)
        settings_page.clickClearSavedValues()
        home_page.verifySettingsLink()
        settings_page.selectClient()
        client_list = home_page.getClientList()
        print(client_list)
        self.assertEqual(client_list, "", "Client list not updated")
コード例 #4
0
    def test_iframe_caching(self):
        home_page = HomePage(self.webdriver, self.config)
        home_page.verifySideBarClients()
        home_page.getOptimizationPage()
        home_page.getDataExplorerPage()

        landing_page = ClientLandingPage(self.webdriver, self.config)

        landing_page.dataToolTab()
        landing_page.getLibraryPage()

        home_page = HomePage(self.webdriver, self.config)
        home_page.cachingTest()

        sleep(15)
        iframe = self.webdriver.find_elements_by_tag_name('iframe')[0]
        self.webdriver.switch_to_frame(iframe)
        sleep(10)
        flag = self.webdriver.find_element_by_xpath(
            "//*[text()='Data Catalogs']").is_displayed()
        print(flag)
        self.assertEqual(flag, 'True', 'IFrame cache not working')
コード例 #5
0
 def test_login(self):
     home_page = HomePage(self.webdriver, self.config)
     home_page.verifyHomePageApplicationLinks()