def get_unable_to_work_unemployment_not_applicable_radio_button_state( self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators. UNABLE_TO_WORK_UNEMPLOYMENT_NOT_APPLICABLE_RADIO_BUTTON) ).is_selected()
def tick_all_agreement_statements(self): dpa_statements = WebDriverWait(self.driver, self.TIMEOUT).until( EC.presence_of_all_elements_located( ProfileStage.DataProtection.Locators.DPA_ALL_CHECKBOXES)) for i in range(1, len(dpa_statements) + 1): self.driver.find_element( By.ID, ProfileStage.DataProtection.Locators.FIRST_DPA_CHECKBOX.format(i)) \ .click() return self
def get_cost_of_protection_no_radio_button_state(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( LifeCriticalTab.Locators.COST_OF_PROTECTION_NO_RADIO_BUTTON) ).is_selected()
def get_needs_and_priorities_question(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable(ProfileStage.NeedsAndPriorities. Locators.FIRST_QUESTION)).text
def get_protection_data_table(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( ExistingProvisionTab.Locators.TABLE_ROW))
def get_unable_to_work_illness_no_radio_button_state(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators. UNABLE_TO_WORK_ILLNESS_NO_RADIO_BUTTON)).is_selected()
def get_address_this_value(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators.ADDRESS_THIS_TEXTFIELD)).text
def get_impact_on_customer_value(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators.IMPACT_ON_CUSTOMER)).text
def get_life_standards_critical_illness_no_radio_button_state(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( LifeCriticalTab.Locators. LIFE_STANDARDS_CRITICAL_ILLNESS_NO_RADIO_BUTTON)).is_selected( )
def get_goals_form_value(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( self.Locators.GOALS_OR_NEEDS)).text
def get_generated_risk_profile(self): return WebDriverWait(self.driver, self.TIMEOUT).until( EC.visibility_of_element_located( self.Locators.GENERATED_RISK_PROFILE)).text
def get_chosen_risk_profile(self): return WebDriverWait(self.driver, self.TIMEOUT).until( EC.visibility_of_element_located( self.Locators.CHOOSEN_RISK_PROFILE)).text
def get_save_button_attribute(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( ProfileStage.Risk.Locators.SAVE_BUTTON)).get_attribute( "class")
def get_warning_message(self): return WebDriverWait(self.driver, self.TIMEOUT).until( EC.visibility_of_element_located( self.Locators.WARNING_MESSAGE)).text
def get_reason_to_not_review_value(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( LifeCriticalTab.Locators.REASON_TO_REVIEW)).text
def get_is_mortgage_debt_cleared_not_applicable_radio_button_state(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( LifeCriticalTab.Locators. MORTGAGE_AND_DEBT_CLEARED_NOT_APPLICABLE_RADIO_BUTTON) ).is_selected()
def get_current_position_broad_content_value(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( self.Locators.BROAD_CONTENT)).text
def get_life_standards_death_not_applicable_radio_button_state(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( LifeCriticalTab.Locators. LIFE_STANDARDS_DEATH_NOT_APPLICABLE_RADIO_BUTTON)).is_selected( )
def get_next_steps_value(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( self.Locators.NEXT_STEPS)).text
def get_impact_on_dependants_value(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators.IMPACT_ON_DEPENDANTS)).text
def get_life_cover_sum(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( self.Locators.LIFE_COVER_SUM_READONLY_FIELD)).get_attribute( "value")
def get_not_reviewing_reason_value(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( IncomeProtectionTab.Locators.REASON_NOT_REVIEW)).text
def get_monthly_total(self): return WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable( BudgetStage.Income.Locators.MONTHLY_TOTAL)).text
def get_total_monthly_expenditure(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( BudgetStage.MonthlyExpenditure.Locators. TOTAL_MONTHLY_EXPENDITURE)).get_attribute("value")
def get_total_monthly_disposable_income(self): return WebDriverWait(self.driver, 10).until( EC.visibility_of_element_located( BudgetStage.MonthlyExpenditure.Locators. TOTAL_MONTHLY_DISPOSABLE_INCOME)).get_attribute("value")
def get_data_table_rows(self): WebDriverWait(self.driver, 10).until( EC.presence_of_element_located( ExistingProvisionTab.Locators.TABLE_ROW)) return self.driver.find_elements_by_css_selector( "#sidebar-container table tbody tr:not(.filter)")
def get_second_life_full_name(self): return WebDriverWait(self.driver, 60).until( EC.visibility_of_element_located( ProfileStage.Personal.Locators.SECOND_LIFE_FULL_NAME)).text