Exemplo n.º 1
0
def test_signine(driver):
    """
    ===Description:
        -Go to 'https://www.vpnunlimitedapp.com/en'
        -Open Navigation Bar
        -Press 'Sign In'
        -Enter Email as a login
        -Enter Password
        -Wait until you logined in
        -Open Navigation Bar
    ===Expected Result:
        -In navigation bar appears field 'My account'
    """

    login = page.MainPage(driver)
    login.go_to_main()
    login.click_for_signin(navbar)
    login.sign_in_press(signin_button)
    login.enter_email(email_path, email)
    login.enter_pass(pass_path, password)
    with allure.MASTER_HELPER.step('Screen_shot_input'):
        allure.MASTER_HELPER.attach('screen_shot',
                                    driver.get_screenshot_as_png(),
                                    type=AttachmentType.PNG)
    login.click_for_signin(login_but)
    time.sleep(6)
    login.click_for_signin(navbar)
    login.sign_in_press(my_acc)
Exemplo n.º 2
0
def test_protectee(driver):
    """
    ===Description:
        -Go to  'https://www.vpnunlimitedapp.com/en'
        -Press 'Protect Me'
    ===Expected Result:
        -Opening 'https://www.vpnunlimitedapp.com/en/downloads/windows'
    """

    button = page.MainPage(driver)
    button.go_to_main()
    with allure.MASTER_HELPER.step('Screen_shot'):
        allure.MASTER_HELPER.attach('screen_shot', driver.get_screenshot_as_png(), type=AttachmentType.PNG)
    button.protect_me(button_me, check_link)
Exemplo n.º 3
0
def test_ip(driver):
    """
    ===Description:
        -Go to 'https://www.vpnunlimitedapp.com/en'
        -Press 'Extras'
        -Click 'Personal Static IP'
    ===Expected Result:
        -'https://www.vpnunlimitedapp.com/en/extras/personal-static-ip' opening
    """

    ip = page.MainPage(driver)
    ip.go_to_main()
    ip.for_ip_extras(path)
    with allure.MASTER_HELPER.step('Screen_shot'):
        allure.MASTER_HELPER.attach('screen_shot', driver.get_screenshot_as_png(), type=AttachmentType.PNG)
    ip.staticip_click(ip_xpath, check_url)
Exemplo n.º 4
0
    def test_search_in_python_org(self):
        """
        Tests python.org search feature. Searches for the word "pycon" then verified that some results show up.
        Note that it does not look for any particular text in search results page. This test verifies that
        the results were not empty.
        """

        #Load the main page. In this case the home page of Python.org.
        main_page = page.MainPage(self.driver)
        #Checks if the word "Python" is in title
        assert main_page.is_title_matches(), "python.org title doesn't match."
        #Sets the text of search textbox to "pycon"
        main_page.search_text_element = "pycon"
        main_page.click_go_button()
        search_results_page = page.SearchResultsPage(self.driver)
        #Verifies that the results page is not empty
        assert search_results_page.is_results_found(), "No results found."
Exemplo n.º 5
0
def test_footerinpu(driver):
    """
    ===Description:
        -Go to 'https://www.vpnunlimitedapp.com/en'
        -Input incorrect data in Email-textfield in site footer with text 'Subscription'
        -Click to submit
    ===Expected Result:
        -'The "E-mail" field must contain a valid email address.' warning opens
    """

    footer = page.MainPage(driver)
    footer.go_to_main()
    footer.input_for_footer(incorrect_data, footer_inp)
    with allure.MASTER_HELPER.step('Screen_shot'):
        allure.MASTER_HELPER.attach('screen_shot',
                                    driver.get_screenshot_as_png(),
                                    type=AttachmentType.PNG)
    footer.click_for_footer(path, path1, check_text)
Exemplo n.º 6
0
 def test_1(self):
     self.driver.get("https://www.google.ru")
     main_page = page.MainPage(self.driver)
     main_page.set_email()
     assert False