def wait_for_page_to_load(self, element):
     try:
         iSelenium().wait_until_element_is_visible(element, timeout=25)
         return True
     except Exception as e:
         print("\nElement is not visible, error message is: " + str(e) +
               ".\n")
         return False
 def configure_downstream(self, frequency, symrate, rolloff):
     locator_lst = [self.id_rf_frequency, self.id_symrate, self.id_rolloff]
     value_lst = [frequency, symrate, rolloff]
     try:
         for each_locator, each_value in zip(locator_lst, value_lst):
             iSelenium().set_kendo_ui_numeric_box(each_locator, each_value)
         status = self.enable_continue_btn()
         if not status:
             return status
         return True
     except:
         return False
 def input_antenna_pointing_details(self, latitude, longitude):
     locator_lst = [self.id_remote_latitude, self.id_remote_longitude]
     value_lst = [latitude, longitude]
     try:
         for each_locator, each_value in zip(locator_lst, value_lst):
             iSelenium().set_kendo_ui_numeric_box(each_locator, each_value)
         status = self.enable_continue_btn()
         if not status:
             return status
         return True
     except:
         False
 def wait_and_click_btn(self, btn_locator):
     try:
         iSelenium().wait_until_element_is_enabled(btn_locator, timeout=25)
         time.sleep(3)
         iSelenium().click_button(btn_locator)
         time.sleep(1)
         return True
     except Exception as e:
         print(
             "\nButton is not enabled to click on it, error message is: " +
             str(e) + ".\n")
         return False
Beispiel #5
0
 def goto_commissioning_wizard_page(self):
     BuiltIn().sleep(10)
     iSelenium().wait_until_element_is_enabled(self.lnk_commissioning)
     iSelenium().click_link(self.lnk_commissioning)
     iSelenium().wait_until_element_is_enabled(self.lnk_commissioning_wizard)
     iSelenium().click_link(self.lnk_commissioning_wizard)
     return self.wait_for_page_to_load()
 def p1db_test(self, frequency):
     try:
         btn_list = [
             self.btn_turn_on_signal, self.btn_apply_changes,
             self.btn_turn_off_signal_and_complete
         ]
         iSelenium().set_kendo_ui_numeric_box(self.id_uplink_frequency,
                                              frequency)
         for each_btn in btn_list:
             status = self.wait_and_click_btn(each_btn)
             time.sleep(2)
             if not status:
                 return False
         status = self.enable_continue_btn()
         if not status:
             return status
         return True
     except:
         return False
 def fine_antenna_pointing(self):
     try:
         btn_list = [
             self.btn_antenna_pointing, self.btn_continue_to_point_antenna
         ]
         for each_btn in btn_list:
             status = self.wait_and_click_btn(each_btn)
             if not status:
                 return status
         for i in range(0, 60):
             output = iSelenium().get_text(self.txt_lock_status)
             time.sleep(1)
             if "locked" in output.lower():
                 break
         self.wait_and_click_btn(self.btn_antenna_pointing)
         status = self.enable_continue_btn()
         if not status:
             return status
         return True
     except:
         return False
 def cross_polarization_test(self):
     iSelenium().wait_for_spinner_to_complete()
     time.sleep(5)
     status = self.wait_and_click_btn(self.btn_skip_to_next_step)
     return status
 def login(self, username, password):
     iSelenium().input_text(self.txt_username, username)
     iSelenium().input_text(self.txt_password, password)
     iSelenium().click_button(self.btn_login)        
     return terminal_dashboard_page().wait_for_page_to_load()
 def wait_for_page_to_load(self):
     try:
         iSelenium().wait_until_element_is_visible(self.btn_login, timeout=240)  # I say here, if login button appears, it means page is loaded. my assumption and mostly true in this case
         return True
     except:
         return False
Beispiel #11
0
 def wait_for_page_to_load(self):
     try:
         iSelenium().wait_until_element_is_visible(self.lnk_commissioning, timeout=20)
         return True
     except:
         return False