Exemplo n.º 1
0
    def btn_clk_login(self):

        #click on log in button
        driver.find_element_by_xpath(
            read_config.read_element_locator('Login_page',
                                             'btn_login')).click()
        label_welcome = driver.find_element_by_xpath(
            read_config.read_element_locator('Login_page',
                                             'Label_Hello_Admin'))
Exemplo n.º 2
0
    def select_graph_region_vs_peer_region(self):

        #wait for the graph to display
        WebDriverWait(driver, 20).until(ec.visibility_of_element_located((By.XPATH, "//*[@id='dv_chart_row_panel']/div[2]/div[4]/a/img")))
        img_reg_vs_peer = driver.find_element_by_xpath(read_config.read_element_locator('Home_Page', 'image_region_vs_peer'))

        #click on the graph link to display on page
        img_reg_vs_peer.click()
Exemplo n.º 3
0
    def validate_graph_trust_vs_peer_region(self,str_excel_ws):

        value_graph_one = str_excel_ws.cell(row=5, column=4).value
        # wait for the graph to display
        WebDriverWait(driver, 60).until(ec.visibility_of_element_located((By.XPATH, "//*[@id='region_nd_other']")))
        label_graph = driver.find_element_by_xpath(read_config.read_element_locator('Home_Page', 'graph_label'))
        label_graph_two_text=label_graph.text

        #assert that the graph is loaded correctly
        assert label_graph_two_text.find(value_graph_one) != -1, print("Failed to verify Region vs Peer Regions graph")
Exemplo n.º 4
0
    def validate_graph_trust_vs_region(self,str_excel_ws):

        value_graph_two = str_excel_ws.cell(row=3, column=2).value

        #wait for the graph to display on browser
        #WebDriverWait(driver, 20).until(ec.visibility_of_element_located((By.XPATH, "//*[@id='region_nd_other']")))
        label_graph = driver.find_element_by_xpath(read_config.read_element_locator('Home_Page', 'graph_label'))
        label_graph_text = label_graph.text

        #Validate the graph labels through assestions
        assert label_graph_text.find(value_graph_two) != -1, print("Verified that graph is loaded successfully")
Exemplo n.º 5
0
    def validate_home_page(self, login_cred):

        #read the home page for log in message
        label_welcome = driver.find_element_by_xpath(
            read_config.read_element_locator('Login_page',
                                             'Label_Hello_Admin'))
        label_welcome_text = label_welcome.text

        #assert that the home page displays the correct message
        assert label_welcome_text.find("Hello " +
                                       login_cred.upper()) != -1, "Test Passed"
Exemplo n.º 6
0
    def select_dropdown_value(self):

        select2 = driver.find_element_by_xpath(
            read_config.read_element_locator(
                'Home_Page', 'drop_down_click')).send_keys('RR3' + Keys.TAB)
Exemplo n.º 7
0
    def click_logout(self):

        #click on Log out button
        driver.find_element_by_xpath(read_config.read_element_locator('Home_Page','logout_click')).click()
        time.sleep(3)
Exemplo n.º 8
0
    def select_dropdown_value(self,str_region,str_Label_text):

        driver.find_element_by_xpath(read_config.read_element_locator('Home_Page', 'drop_down_click')).send_keys(str_region+Keys.TAB)
Exemplo n.º 9
0
 def enter_password(self, password):
     # enter password
     driver.find_element_by_xpath(
         read_config.read_element_locator(
             'Login_page', 'txt_Password')).send_keys(password)
Exemplo n.º 10
0
 def enter_login(self, login_cred):
     #enter user id
     driver.find_element_by_xpath(
         read_config.read_element_locator(
             'Login_page', 'txt_User_Name')).send_keys(login_cred)
Exemplo n.º 11
0
    def validate_home_page(self):

      label_welcome = driver.find_element_by_xpath(read_config.read_element_locator('Login_page','Label_Hello_Admin'))
      label_welcome_text = label_welcome.text
      print(label_welcome_text)
      assert label_welcome_text.find("Hello") != -1,"Test Passed"