def inputRecoveryField(self, inputRecoveryField):
        uiHelper = UiHelper(self.driver)
        uiHelper.waitVisibleElementByXPATH(self.elements["inputRecoveryField"])
        uiHelper.elementIsClickableByXPATH(self.elements["inputRecoveryField"])

        self.driver.find_element_by_xpath(self.elements["inputRecoveryField"]).clear()
        self.driver.find_element_by_xpath(self.elements["inputRecoveryField"]).send_keys(inputRecoveryField)
Example #2
0
def testUsernameAndPasswodEmpty_1(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName("")
    loginForm.inputPassword("")
    loginForm.clickSignInButton()

    usernameErrorText = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["usernameMustBeFilledText"])
    assert (usernameErrorText) == usernameErrorText

    passErrorText = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["passMustBeFilledText"])
    assert (passErrorText) == passErrorText
Example #3
0
def testInputInvalidCharacters_5(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName("[|]'~<!--@%/*$%^&#*/()?>,|\.*/'")
    loginForm.inputPassword("[|]'~<!--@%/*$%^&#*/()?>,|\.*/'")
    loginForm.clickSignInButton()

    errorLigonText = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["errorLoginText"])
    assert (errorLigonText) == errorLigonText
Example #4
0
def testInputOneSymbol_4(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName(".")
    loginForm.inputPassword(".")
    loginForm.clickSignInButton()

    errorLigonText = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["errorLoginText"])
    assert (errorLigonText) == errorLigonText
Example #5
0
def testUsernameEmpty_3(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName("")
    loginForm.inputPassword("test")
    loginForm.clickSignInButton()

    errorLigonText = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["usernameMustBeFilledText"])
    assert (errorLigonText) == errorLigonText
Example #6
0
def testRecoveryField_phoneNumber_7(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.clickForgotPassButton()
    loginForm.inputRecoveryField("+79191234567")
    loginForm.clickRecoveryButtonNext()

    element = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["titleNotFindContract"])
    assert (element) == element
Example #7
0
def testRecoveryField_email_10(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.clickForgotPassButton()
    loginForm.inputRecoveryField("*****@*****.**")
    loginForm.clickRecoveryButtonNext()

    element = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["titleNotFindContract"])
    assert (element) == element
Example #8
0
def testUsernameAndPassword_contractNumber_7(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName("â„–test12345")
    loginForm.inputPassword("test")
    loginForm.clickSignInButton()

    element = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["errorLoginText"])
    assert (element) == element
Example #9
0
def testUsernameAndPassword_email_12(setUp):
    loginForm = LoginFormPage(setUp)
    uiHelper = UiHelper(setUp)

    loginForm.openLoginForm()
    loginForm.inputUserName("*****@*****.**")
    loginForm.inputPassword("test")
    loginForm.clickSignInButton()

    element = uiHelper.waitVisibleElementByXPATH(
        loginForm.elements["errorLoginText"])
    assert (element) == element
    def clickRecoveryButtonNext(self):
        uiHelper = UiHelper(self.driver)
        uiHelper.waitVisibleElementByXPATH(self.elements["clickRecoveryButtonNext"])
        uiHelper.elementIsClickableByXPATH(self.elements["clickRecoveryButtonNext"])

        self.driver.find_element_by_xpath(self.elements["clickRecoveryButtonNext"]).click()
    def clickForgotPassButton(self):
        uiHelper = UiHelper(self.driver)
        uiHelper.waitVisibleElementByXPATH(self.elements["clickForgotPassButton"])
        uiHelper.elementIsClickableByXPATH(self.elements["clickForgotPassButton"])

        self.driver.find_element_by_xpath(self.elements["clickForgotPassButton"]).click()
    def checkBoxRememberMe(self):
        uiHelper = UiHelper(self.driver)
        uiHelper.waitVisibleElementByXPATH(self.elements["checkBoxRememberMe"])
        uiHelper.elementIsClickableByXPATH(self.elements["checkBoxRememberMe"])

        self.driver.find_element_by_xpath(self.elements["checkBoxRememberMe"]).click()
    def clickSignInButton(self):
        uiHelper = UiHelper(self.driver)
        uiHelper.waitVisibleElementByXPATH(self.elements["signInButton"])
        uiHelper.elementIsClickableByXPATH(self.elements["signInButton"])

        self.driver.find_element(By.XPATH, self.elements["signInButton"]).click()