def test_open_request_form(browser, organisation, inn, name, phone, email, comment): link = "https://maxipro.ru" page = MainPage(browser, link) page.open_page() page.should_be_request_link() page.open_request_form() form = RequestForm(browser, link) form.check_request_form() form.input_org_name(organisation) form.input_inn_number(inn) form.input_person_name(name) form.input_phone_number(phone) form.input_email(email) form.input_comment(comment) form.should_be_submit_btn() form.submit_request() form.check_error_message_title() form.check_agreement_error_text() form.push_error_msg_btn() form.check_request_form() form.fill_spec_checkbox() form.fill_agreement_checkbox() form.submit_request() form.check_error_message_title() form.check_requisite_error_text() form.push_error_msg_btn() form.check_request_form() form.load_requisite() form.submit_request() form.check_error_message_title() form.check_list_error_text() form.push_error_msg_btn() form.check_request_form() form.load_list() # page.should_be_submit_btn() # page.submit_request() # page.check_success_message_text() # page.push_success_btn() # page.check_list_type_error_text() time.sleep(10)
def test_add_to_cart_from_main_page(browser, name, phone): # Arrange link = "https://maxipro.ru" main_page = MainPage(browser, link) main_page.open_page() main_page.scroll_down(1000) # Act main_page.push_add_to_cart_btn() time.sleep(5) main_page.push_place_an_order_btn() cart_page = CartPage(browser, link) cart_page.place_one_click_order() cart_page.fill_name(name) cart_page.fill_phone(phone) cart_page.choose_delivery_method() cart_page.send_an_order() # Assert cart_page.check_success_msg_title()