Exemple #1
0
 def login_button(self):
     login_button_file = self.field[4].text
     login_field = Element.fetch_element_by_id(self.driver,
                                               login_button_file)
     login_field_value = login_field.text
     print(login_field_value)
     return login_field
Exemple #2
0
 def login_text(self):
     """This def is used to find if the text "login" is present on the page"""
     login_text_file = self.field[1].text
     login_text = Element.fetch_element_by_xpath(self.driver,
                                                 login_text_file).text
     print(login_text)
     return login_text
Exemple #3
0
 def password_field(self):
     password_field_file = self.field[3].text
     password_field = Element.fetch_element_by_id(self.driver,
                                                  password_field_file)
     password_field_value = password_field.get_attribute('name')
     print(password_field_value)
     return password_field
Exemple #4
0
 def flexera_logo(self):
     """This def is to check if "Flexera" logo is present on the login page"""
     logo_field = self.field[0].text
     logo = Element.fetch_element_by_xpath(
         self.driver, logo_field).get_attribute('class')
     print(logo)
     return logo
Exemple #5
0
 def username_field(self):
     """This def is to check if the "username" field is present on the login page"""
     username_field_file = self.field[2].text
     # global username_field
     username_field = Element.fetch_element_by_id(self.driver,
                                                  username_field_file)
     # global username_field_value
     username_field_value = username_field.get_attribute('name')
     print(username_field_value)
     return username_field
Exemple #6
0
 def remove_all_widgets(self):
     remove_gadgets_file = self.field[1].text
     element1 = Element.fetch_elements_by_classname(self.driver,
                                                    remove_gadgets_file)
     print(len(element1))
     time.sleep(2)
     for x in range(0, len(element1)):
         if element1[x].is_displayed():
             element1[x].click()
     time.sleep(10)
     self.dashboard.save_button().click()
Exemple #7
0
 def error_message(self):
     error_from_file = self.field[7].text
     error_message = Element.fetch_element_by_xpath(self.driver,
                                                    error_from_file).text
     return error_message
Exemple #8
0
 def get_available_gadgets(self):
     add_gadgets_file = self.field[3].text
     add_gadgets = Element.fetch_element_by_xpath(self.driver,
                                                  add_gadgets_file)
     return add_gadgets
Exemple #9
0
 def remove_gadgets(self):
     remove_gadgets_file = self.field[1].text
     remove_gadget = Element.fetch_element_by_class(self.driver,
                                                    remove_gadgets_file)
     return remove_gadget