def users_info():
    page = Eingabe(driver=chrome_webdriver)
    page.input_30yo()
    # Self-employed and Employed
    if random_user in [
            OnlineAssistanceUsers.OA_OCCUPATION_SELF_EMPLOYED,
            OnlineAssistanceUsers.OA_OCCUPATION_EMPLOYEE
    ]:
        if random_user == OnlineAssistanceUsers.OA_OCCUPATION_SELF_EMPLOYED:
            page.randomly_choosing_worker_amount_selbstandig()
        if random_user == OnlineAssistanceUsers.OA_OCCUPATION_SELF_EMPLOYED:
            page.randomly_choosing_worker_amount_selbstandig()
        page.select_insurance_start_date()
        previous_insurance = page.select_previous_insurance_by_text()
        page.check_weiter_button_is_enabled()
        page.weiter_button.click()
        # if previously privately insured
        if previous_insurance == "Privat":
            print("Private insurance!")
            page = UbertragungswertPage(driver=chrome_webdriver)
            page.input_uebertragungswert()
            page.weiter_button.click()
        print("Choosing lebensjahr!")
        page = Beitragsentlastung(driver=chrome_webdriver)
        sleep(2)
        random_lebensjahr_button = page.random_lebensjahr_button
        random_lebensjahr_button.click()
        print(random_lebensjahr_button.good_text)
        page.check_weiter_button_is_enabled()
        page.weiter_button.click()
    # Student
    elif random_user == OnlineAssistanceUsers.OA_OCCUPATION_STUDENT:
        page.select_previous_insurance_by_text()
        page.select_insurance_start_date()
        page.weiter_button.click()
    # Civil servant and civil servant applicant
    elif random_user == OnlineAssistanceUsers.OA_OCCUPATION_CIVIL_SERVANT or OnlineAssistanceUsers.OA_OCCUPATION_CIVIL_SERVANT_APPLICANT:
        page.select_randomly_beihilfe_state()
        page.select_randomly_beihilfe_satz()
        page.input_beihilfe_start()
        page.select_randomly_beihilfe_start()
        page.weiter_button.click()
    else:
        print("Non-existing proffession!")
Example #2
0
page.check_weiter_button_is_enabled()
page.weiter_button.click()

# 5 Click on Vollversicherung tile
wait.until(EC.url_contains(TypeVersicherung.my_url))
page = TypeVersicherung(driver=chrome_webdriver)
page.find_vollversicherung_button.click()


# TODO:
# 6 Fill in the date OLD STUDENT

# Day

wait.until(EC.url_contains(Eingabe.my_url))
page = Eingabe(driver=chrome_webdriver)

page.check_weiter_button_is_disabled()


# TEST SCENARIO FOR BOUNDARY VALUE ANALYSIS
page.input_all_data(age_in_years=0, difference_in_days=-1,
                    previous_insurance_type=Eingabe.RANDOM,
                    insurance_start_date=datetime.date(year=2019, month=5, day=1))
page.input_all_data(age_in_years=18, difference_in_days=-1,
                    previous_insurance_type=Eingabe.RANDOM,
                    insurance_start_date=datetime.date(year=2019, month=5, day=1))
page.input_all_data(age_in_years=18, difference_in_days=0,
                    previous_insurance_type=Eingabe.RANDOM,
                    insurance_start_date=datetime.date(year=2019, month=5, day=1))
page.input_date_of_birth_and_assert_validations(age_in_years=20, difference_in_days=0)