def fill_new_user_form(self, firsname=None, lastname=None, email=None, country_code=None, phone=None): form_element = UsersPageElements(self.driver) GeneralActions(self.driver).click_on_button(form_element.new_user_button()) form_element.firstname_input().send_keys(firsname) form_element.lastname_input().send_keys(lastname) form_element.email_input().send_keys(email) form_element.country_code_input().click() form_element.country_code_input().clear() form_element.country_code_input().send_keys(country_code) form_element.phone_number_input().send_keys(phone) GeneralActions(self.driver).click_on_button(form_element.submit_button()) time.sleep(2)
def test_intro_block(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) time.sleep(3) mp_element.sidebar_intro().click() time.sleep(2) # check that Intro block is displayed general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, 0);') # check block elements general_action.check_element_on_page(mp_element.page_title()) general_action.check_element_on_page(mp_element.tryitnow_button()) general_action.check_element_on_page(mp_element.howitworks_button()) # check buttons mp_element.tryitnow_button().click() general_action.check_url(page_url + '#signup') general_action.open_page_by_url(page_url) time.sleep(2) mp_element.howitworks_button().click() time.sleep(2) general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, -16);')
def test_usages_block(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) time.sleep(3) mp_element.sidebar_usagecases().click() time.sleep(2) # check that usages block is displayed general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, -48);') # check block elements general_action.check_element_on_page( mp_element.usability_and_security_title()) general_action.scroll_page('5000') time.sleep(2) general_action.check_element_on_page(mp_element.slider_internet()) mp_element.slider_right_button().click() time.sleep(2) general_action.check_element_on_page(mp_element.slider_pad()) mp_element.slider_right_button().click() time.sleep(2) general_action.check_element_on_page(mp_element.slider_mask()) mp_element.slider_left_button().click() time.sleep(2) general_action.check_element_on_page(mp_element.slider_pad()) time.sleep(2)
def test_solution_block(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) time.sleep(3) mp_element.sidebar_solution().click() time.sleep(2) # check that solution block is displayed general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, -32);') # check block elements general_action.check_element_on_page( mp_element.usability_and_security_title()) general_action.scroll_page('2400') time.sleep(2) general_action.check_element_on_page(mp_element.faq_button()) # check button mp_element.faq_button().click() general_action.check_url(page_url + '#faq')
def test_problem_block(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) time.sleep(3) mp_element.sidebar_problem().click() time.sleep(2) # check that problem block is displayed general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, -16);') # check block elements general_action.check_element_on_page(mp_element.howitworks_title()) general_action.scroll_page('1400') time.sleep(2) general_action.check_element_on_page( mp_element.ten_reason_to_love_button()) # check button mp_element.ten_reason_to_love_button().click() general_action.check_url(page_url + '#why')
def test_button(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) pricing_element = PricingPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#pricing') general_action.click_on_button(pricing_element.try_button()) general_action.check_url(page_url + '#signup')
def login_cancel(self, email): main_elements = MainPageElements(self.driver) general_action = GeneralActions(self.driver) general_action.click_on_button(main_elements.login_button()) main_elements.dialog_username_input().click() main_elements.dialog_username_input().send_keys(email) main_elements.dialog_cancel_button().click()
def test_general_elements(fixture_webdriver): general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url( MainPageElements(fixture_webdriver).url() + '#login') # check header elements general_action.check_element_on_page(mp_element.logo()) general_action.check_element_on_page(mp_element.hamburger_menu_button())
def test_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) pricing_element = PricingPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#pricing') general_action.check_element_on_page(pricing_element.pricing_title()) general_action.check_element_on_page(pricing_element.text()) general_action.check_element_on_page(pricing_element.contact_button()) general_action.check_element_on_page(pricing_element.try_button())
def test_page_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) int_element = IntegrationPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#integration') general_action.check_element_on_page(int_element.integration_title()) general_action.check_element_on_page(int_element.schedule_block()) general_action.check_element_on_page(int_element.what_next_block()) general_action.check_element_on_page(int_element.schedule_button())
def test_hamburger_privacy(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) mp_element.hamburger_menu_button().click() time.sleep(3) general_action.check_element_on_page(mp_element.hamburger_privacy()) mp_element.hamburger_privacy().click() general_action.check_url(page_url + '#privacy')
def test_general_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#pricing') time.sleep(3) # check header elements general_action.check_element_on_page(mp_element.logo()) general_action.check_element_on_page(mp_element.signup_button()) general_action.check_element_on_page(mp_element.login_button()) general_action.check_element_on_page(mp_element.hamburger_menu_button())
def test_check_elements(fixture_webdriver): users_element = UsersPageElements(fixture_webdriver) general_actions = GeneralActions(fixture_webdriver) UsersPageActions(fixture_webdriver).open_users_page() time.sleep(10) general_actions.check_url( MainPageElements(fixture_webdriver).url() + "#users") general_actions.check_element_on_page(users_element.users_title()) general_actions.check_element_on_page(users_element.list_of_emails()) general_actions.check_element_on_page(users_element.content_left()) general_actions.check_element_on_page(users_element.content_right())
def login_full_case(self, email): main_elements = MainPageElements(self.driver) login_elements = LoginPageElements(self.driver) general_action = GeneralActions(self.driver) general_action.click_on_button(main_elements.login_button()) main_elements.dialog_username_input().click() main_elements.dialog_username_input().send_keys(email) main_elements.dialog_next_button().click() login_elements.use_automatic_button().click() login_elements.login_button().click() time.sleep(35)
def test_page_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) why_element = WhyPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#why') time.sleep(3) general_action.check_element_on_page(why_element.why_title()) general_action.check_element_on_page(why_element.ten_reasons_title()) general_action.check_element_on_page(why_element.ten_reasons_text_block()) general_action.scroll_page('1000') general_action.check_element_on_page(why_element.have_question_button()) general_action.check_element_on_page(why_element.try_it_button())
def test_page_elements(fixture_webdriver): general_action = GeneralActions(fixture_webdriver) login_element = LoginPageElements(fixture_webdriver) general_action.open_page_by_url( MainPageElements(fixture_webdriver).url() + '#login') time.sleep(3) general_action.check_element_on_page(login_element.login_page_title()) general_action.check_element_on_page(login_element.login_form()) general_action.check_element_on_page(login_element.account_id()) general_action.check_element_on_page(login_element.login_input()) general_action.check_element_on_page(login_element.login_button()) general_action.check_element_on_page(login_element.signup_button()) general_action.check_element_on_page(login_element.use_automatic_button()) general_action.check_element_on_page(login_element.text_block())
def test_page_element(fixture_webdriver): general_action = GeneralActions(fixture_webdriver) page_element = EditUsersPageElements(fixture_webdriver) UsersPageActions(fixture_webdriver).open_edit_user_page() general_action.check_element_on_page(page_element.username_block()) general_action.check_element_on_page(page_element.first_name_block()) general_action.check_element_on_page(page_element.last_name_block()) general_action.check_element_on_page(page_element.email_block()) general_action.check_element_on_page(page_element.phone_block()) general_action.check_element_on_page(page_element.data_block()) general_action.check_element_on_page(page_element.suspend_button()) general_action.check_element_on_page(page_element.delete_button()) general_action.check_element_on_page(page_element.activity_block()) EditUsersPageActions(fixture_webdriver).delete_user()
def test_page_elements(fixture_webdriver): general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) welcome_elements = WelcomePageElements(fixture_webdriver) LoginActions(fixture_webdriver).login_full_case( UsersPageElements(fixture_webdriver).admin_email()) # check elements general_action.check_element_on_page(mp_element.logo()) general_action.check_element_on_page(mp_element.hamburger_menu_button()) general_action.check_element_on_page(welcome_elements.logout_button()) general_action.check_element_on_page(welcome_elements.welcome_time()) general_action.check_element_on_page(welcome_elements.content_block()) general_action.check_element_on_page(welcome_elements.dashboard_button()) general_action.check_element_on_page(welcome_elements.partner_button())
def test_general_elements(fixture_webdriver): time.sleep(5) page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) # check header elements general_action.check_element_on_page(mp_element.logo()) general_action.check_element_on_page(mp_element.signup_button()) general_action.check_element_on_page(mp_element.login_button()) general_action.check_element_on_page(mp_element.hamburger_menu_button()) # check footer elements general_action.check_element_on_page(mp_element.footer_whyus()) mp_element.footer_whyus().click() time.sleep(3) general_action.check_url(page_url + '#why') general_action.open_page_by_url(page_url) time.sleep(3) general_action.check_element_on_page(mp_element.footer_company()) mp_element.footer_company().click() time.sleep(3) general_action.check_url(page_url + '#about') general_action.open_page_by_url(page_url) time.sleep(3) general_action.check_element_on_page(mp_element.footer_career()) mp_element.footer_career().click() time.sleep(3) general_action.check_url(page_url + '#careers') general_action.open_page_by_url(page_url) time.sleep(3) general_action.check_element_on_page(mp_element.footer_faq()) mp_element.footer_faq().click() time.sleep(3) general_action.check_url(page_url + '#faq') general_action.open_page_by_url(page_url) time.sleep(3) general_action.check_element_on_page(mp_element.footer_contact()) mp_element.footer_contact().click() time.sleep(3) general_action.check_url(page_url + '#contact')
def test_page_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) signup_element = SignUpPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#signup') time.sleep(3) general_action.check_element_on_page(signup_element.signup_title()) general_action.check_element_on_page(signup_element.text_block()) general_action.check_element_on_page(signup_element.fname_title()) general_action.check_element_on_page(signup_element.fname_input()) general_action.check_element_on_page(signup_element.lname_title()) general_action.check_element_on_page(signup_element.lname_input()) general_action.check_element_on_page(signup_element.email_title()) general_action.check_element_on_page(signup_element.email_input()) general_action.check_element_on_page(signup_element.phone_block()) general_action.check_element_on_page(signup_element.country_code_input()) general_action.check_element_on_page(signup_element.phone_input()) general_action.check_element_on_page(signup_element.create_account_button())
def test_page_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) privacy_element = PrivacyPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#privacy') time.sleep(3) general_action.check_element_on_page(privacy_element.privacy_title()) general_action.check_element_on_page(privacy_element.first_paragraph()) general_action.check_element_on_page(privacy_element.second_paragraph()) general_action.scroll_page('500') general_action.check_element_on_page(privacy_element.third_paragraph()) general_action.check_element_on_page(privacy_element.fourth_paragraph()) general_action.scroll_page('800') general_action.check_element_on_page(privacy_element.fifth_paragraph()) general_action.scroll_page('1500') general_action.check_element_on_page(privacy_element.sixth_paragraph()) general_action.check_element_on_page(privacy_element.seventh_paragraph()) general_action.check_element_on_page(privacy_element.eighth_paragraph()) general_action.check_element_on_page(privacy_element.questions_button())
def test_partner_block(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) mp_element = MainPageElements(fixture_webdriver) general_action.open_page_by_url(page_url) time.sleep(3) mp_element.sidebar_partner().click() time.sleep(3) # check that partner block is displayed general_action.check_active_button_in_sidebar( 'transform: matrix(1, 0, 0, 1, 0, -64);') # check block elements general_action.check_element_on_page(mp_element.get_in_touch_title()) general_action.check_element_on_page(mp_element.meet_team_button()) general_action.check_element_on_page(mp_element.info_sonikpass_button()) # check button mp_element.meet_team_button().click() general_action.check_url(page_url + '#about')
def logout(self): GeneralActions(self.driver).click_on_button(WelcomePageElements(self.driver).logout_button())
def test_login(fixture_webdriver): LoginActions(fixture_webdriver).login_full_case( UsersPageElements(fixture_webdriver).admin_email()) GeneralActions(fixture_webdriver).check_url( MainPageElements(fixture_webdriver).url() + '#welcome')
def open_users_page(self): LoginActions(self.driver).login_full_case(UsersPageElements(self.driver).admin_email()) GeneralActions(self.driver).click_on_button(WelcomePageElements(self.driver).dashboard_button())
def test_page_elements(fixture_webdriver): page_url = MainPageElements(fixture_webdriver).url() general_action = GeneralActions(fixture_webdriver) setup_element = SetupPageElements(fixture_webdriver) general_action.open_page_by_url(page_url + '#setup') general_action.check_element_on_page(setup_element.quick_start_block()) general_action.check_element_on_page(setup_element.quick_start_picture()) general_action.scroll_page('400') general_action.check_element_on_page(setup_element.mobile_app_block()) general_action.check_element_on_page(setup_element.mobile_app_picture()) time.sleep(1) general_action.scroll_page('1000') general_action.check_element_on_page(setup_element.desktop_app_block()) general_action.check_element_on_page(setup_element.desktop_app_picture()) time.sleep(1) general_action.scroll_page('1500') general_action.check_element_on_page(setup_element.login_block()) general_action.check_element_on_page(setup_element.login_picture()) time.sleep(1) general_action.scroll_page('2000') general_action.check_element_on_page(setup_element.add_user_block()) general_action.check_element_on_page(setup_element.add_user_picture()) time.sleep(1) general_action.scroll_page('2500') general_action.check_element_on_page( setup_element.go_to_user_dashboard_block()) general_action.check_element_on_page( setup_element.go_to_user_dashboard_picture()) time.sleep(1) general_action.scroll_page('3000') general_action.check_element_on_page(setup_element.add_single_user_block()) general_action.check_element_on_page( setup_element.add_single_user_picture()) time.sleep(1) general_action.scroll_page('3500') general_action.check_element_on_page(setup_element.import_user_block()) general_action.check_element_on_page(setup_element.import_user_picture()) time.sleep(1) general_action.scroll_page('4000') general_action.check_element_on_page(setup_element.verify_user_block()) general_action.check_element_on_page(setup_element.verify_user_picture()) time.sleep(1) general_action.scroll_page('4500') general_action.check_element_on_page(setup_element.onboarding_post_block()) general_action.check_element_on_page( setup_element.onboarding_email_picture()) time.sleep(1) general_action.scroll_page('5000') general_action.check_element_on_page( setup_element.onboarding_email_block()) general_action.check_element_on_page( setup_element.onboarding_post_picture()) time.sleep(1) general_action.scroll_page('5500') general_action.check_element_on_page( setup_element.user_setup_complete_block()) general_action.check_element_on_page( setup_element.user_setup_complete_picture()) time.sleep(1) general_action.scroll_page('6000') general_action.check_element_on_page(setup_element.gsuite_setup_block()) general_action.check_element_on_page(setup_element.gsuite_setup_picture()) time.sleep(1) general_action.scroll_page('6500') general_action.check_element_on_page(setup_element.gsuite_admin_block()) general_action.check_element_on_page(setup_element.gsuite_admin_picture()) time.sleep(1) general_action.scroll_page('7100') general_action.check_element_on_page( setup_element.select_setup_sso_block()) general_action.check_element_on_page( setup_element.select_setup_sso_picture()) time.sleep(1) general_action.scroll_page('7500') general_action.check_element_on_page(setup_element.select_checkbox_block()) general_action.check_element_on_page( setup_element.select_checkbox_picture()) time.sleep(1) general_action.scroll_page('8000') general_action.check_element_on_page(setup_element.download_sso_block()) general_action.check_element_on_page(setup_element.download_sso_picture()) time.sleep(1) general_action.scroll_page('8700') general_action.check_element_on_page( setup_element.upload_certificate_block()) general_action.check_element_on_page( setup_element.upload_certificate_picture()) time.sleep(1) general_action.scroll_page('9000') general_action.check_element_on_page(setup_element.add_signin_url_block()) general_action.check_element_on_page( setup_element.add_signin_url_picture()) time.sleep(1) general_action.scroll_page('9600') general_action.check_element_on_page(setup_element.add_signout_url_block()) general_action.check_element_on_page( setup_element.add_signout_url_picture()) time.sleep(1) general_action.scroll_page('10200') general_action.check_element_on_page( setup_element.add_change_pass_url_block()) general_action.check_element_on_page( setup_element.add_change_pass_url_picture()) time.sleep(1) general_action.scroll_page('11200') general_action.check_element_on_page(setup_element.click_save_block()) general_action.check_element_on_page(setup_element.click_save_picture()) time.sleep(1) general_action.scroll_page('11650') general_action.check_element_on_page(setup_element.gsuite_complete_block()) general_action.check_element_on_page( setup_element.gsuite_complete_picture())