Esempio n. 1
0
 def count_social_media_imgs_v2(self):
     elements = Utils.find_elements(self.driver, By.CSS_SELECTOR,
                                    '.buttons-w span')
     count = 0
     for x in elements:
         count = count + 1
     return count
Esempio n. 2
0
 def get_warning_msg(self):
     element = Utils.wait_presence_and_get_element(self.driver,
                                                   By.CSS_SELECTOR,
                                                   '.alert-warning')
     text = None
     if element is not None:
         text = element.text
     return text
Esempio n. 3
0
 def get_remember_me_label_text(self):
     return Utils.wait_presence_and_get_element(self.driver,
                                                By.CSS_SELECTOR,
                                                '.form-check-label')
Esempio n. 4
0
 def remember_me_button_is_clickable(self):
     return Utils.wait_clickable_and_get_element(self.driver,
                                                 By.CSS_SELECTOR,
                                                 '.form-check-input')
Esempio n. 5
0
 def get_login_button(self):
     return Utils.wait_presence_and_get_element(self.driver, By.ID,
                                                'log-in')
Esempio n. 6
0
 def password_img_is_present(self):
     return Utils.wait_presence_and_get_element(
         self.driver, By.CSS_SELECTOR, '.form-group:nth-child(2) .pre-icon')
Esempio n. 7
0
 def get_password_box(self):
     return Utils.wait_presence_and_get_element(self.driver, By.ID,
                                                'password')
Esempio n. 8
0
 def click_amount_header(self):
     amount_header = Utils.wait_presence_and_get_element(self.driver, By.ID, 'amount')
     amount_header.click()
Esempio n. 9
0
 def username_img_is_present(self):
     return Utils.wait_presence_and_get_element(self.driver,
                                                By.CSS_SELECTOR,
                                                '.form-group .pre-icon')
Esempio n. 10
0
 def get_username_box(self):
     return Utils.wait_presence_and_get_element(self.driver, By.ID,
                                                'username')
Esempio n. 11
0
 def username_label_is_present(self):
     element = Utils.wait_presence_and_get_element(self.driver,
                                                   By.CSS_SELECTOR,
                                                   '.form-group label')
     return element.text
Esempio n. 12
0
 def get_title(self, title):
     element = Utils.wait_presence_and_get_element(self.driver,
                                                   By.CSS_SELECTOR,
                                                   '.auth-header')
     return element.text
Esempio n. 13
0
 def logo_big_img_is_present(self):
     return Utils.wait_presence_and_get_element(self.driver,
                                                By.CSS_SELECTOR,
                                                '.logo-w img')
Esempio n. 14
0
 def flash_sale2_is_present(self):
     return Utils.wait_presence_and_get_element(self.driver, By.CSS_SELECTOR, '#flashSale2 img')
Esempio n. 15
0
 def click_compare_expenses(self):
     compare_expenses = Utils.wait_clickable_and_get_element(self.driver, By.ID, 'showExpensesChart')
     compare_expenses.click()
Esempio n. 16
0
 def password_label_is_present(self):
     element = Utils.wait_presence_and_get_element(
         self.driver, By.CSS_SELECTOR, '.form-group:nth-child(2)')
     return element.text
Esempio n. 17
0
 def click_show_next_year_button(self):
     button = Utils.wait_presence_and_get_element(self.driver, By.ID, 'addDataset')
     button.click()
Esempio n. 18
0
 def user_is_logged_in(self):
     return Utils.wait_presence_and_get_element(self.driver, By.CSS_SELECTOR, '.avatar-w')