Ejemplo n.º 1
0
class MainUserPage(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def getToPaymentPage(self):
        self.methods.waitForElement(Locator.payments, 'css').clickElement(
            Locator.payments, 'css')
Ejemplo n.º 2
0
class PopupUtilityDetails(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def getTitleDetails(self):
        return self.methods.getText(Locator.titlePopupPayments, 'css')

    def clickButtonPay(self):
        self.methods.clickElement(Locator.pay, 'id')
Ejemplo n.º 3
0
class Welcome(object):

    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def signIn(self):
        self.methods.clickElement(Locator.signIn, 'id')

    def signUp(self):
        self.methods.clickElement(Locator.signUp, 'id')
Ejemplo n.º 4
0
class PaymentsPage(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def getPaymentDetails(self):
        self.methods.waitForElement(Locator.details, 'css').clickElement(
            Locator.details, 'css')

    def getBalanceValue(self):
        methods = Methods(self.driver)
        return float(methods.getText(Locator.balance, 'css'))
Ejemplo n.º 5
0
class PopupSelectPaymentSum(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def enterInputSum(self, sum):
        self.methods.sendKeys(sum, Locator.paymentSum, 'id')

    def getAtributeDownload(self):
        return self.methods.getAttribute('class', Locator.downloadCheck, 'id')

    def getAttributeSend(self):
        return self.methods.getAttribute('class', Locator.sendCheck, 'id')

    def clickBtnDownload(self):
        self.methods.clickElement(Locator.downloadCheck, 'id')

    def clickBtnSendCheck(self):
        self.methods.clickElement(Locator.sendCheck, 'id')

    def clickBtnProceed(self):
        self.methods.clickElement(Locator.proceed, 'id')
Ejemplo n.º 6
0
class Login(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def login(self, email, password):
        self.methods.sendKeys(email, Locator.userEmail, 'id')
        self.methods.sendKeys(password, Locator.userPassword, 'id')
        self.methods.clickElement(Locator.loginButton, 'id')
Ejemplo n.º 7
0
class PopupEasyPay(object):
    def __init__(self, driver):
        self.driver = driver
        self.methods = Methods(self.driver)

    def getToIframe(self):
        self.driver.switch_to.frame(
            self.driver.find_element_by_tag_name("iframe"))

    def getTitleEasypay(self):
        return self.methods.getText(Locator.titlePopupEasyPay, 'css')

    def fillPopupEasyPayFields(self, cardNumber, dateCard, cvNumber):
        methods = Methods(self.driver)
        methods.sendKeys(cardNumber, Locator.cardNumberInput, 'css')
        methods.sendKeys(dateCard, Locator.dateCardInput, 'css')
        methods.sendKeys(cvNumber, Locator.cvNumberInput, 'css')

    def clickRememberMe(self):
        methods = Methods(self.driver)
        methods.clickElement(Locator.btnRememberMe, 'css')

    def getCvNumber(self):
        methods = Methods(self.driver)
        return methods.getText(Locator.cvNumberInput, 'css')

    def getCardNumber(self):
        methods = Methods(self.driver)
        return methods.getText(Locator.cardNumberInput, 'css')

    def getTitlePopupEasyPay(self):
        methods = Methods(self.driver)
        return methods.getText(Locator.titlePopupEasyPay, 'css')

    def fillAdditionalFieldsPopupEasy(self, zipCode, phone, mail):
        methods = Methods(self.driver)
        methods.sendKeys(zipCode, Locator.zipCodeInput, 'css')
        methods.sendKeys(phone, Locator.phoneInput, 'css')
        methods.sendKeys(mail, Locator.mailInput, 'css')
        methods.clickElement(Locator.btnPopupPay, 'class')

    def clickBackPopupEasy(self):
        methods = Methods(self.driver)
        methods.clickElement(Locator.btnBack, 'class')
Ejemplo n.º 8
0
 def clickBackPopupEasy(self):
     methods = Methods(self.driver)
     methods.clickElement(Locator.btnBack, 'class')
Ejemplo n.º 9
0
 def fillAdditionalFieldsPopupEasy(self, zipCode, phone, mail):
     methods = Methods(self.driver)
     methods.sendKeys(zipCode, Locator.zipCodeInput, 'css')
     methods.sendKeys(phone, Locator.phoneInput, 'css')
     methods.sendKeys(mail, Locator.mailInput, 'css')
     methods.clickElement(Locator.btnPopupPay, 'class')
Ejemplo n.º 10
0
 def getTitlePopupEasyPay(self):
     methods = Methods(self.driver)
     return methods.getText(Locator.titlePopupEasyPay, 'css')
Ejemplo n.º 11
0
 def getCardNumber(self):
     methods = Methods(self.driver)
     return methods.getText(Locator.cardNumberInput, 'css')
Ejemplo n.º 12
0
 def clickRememberMe(self):
     methods = Methods(self.driver)
     methods.clickElement(Locator.btnRememberMe, 'css')
Ejemplo n.º 13
0
 def fillPopupEasyPayFields(self, cardNumber, dateCard, cvNumber):
     methods = Methods(self.driver)
     methods.sendKeys(cardNumber, Locator.cardNumberInput, 'css')
     methods.sendKeys(dateCard, Locator.dateCardInput, 'css')
     methods.sendKeys(cvNumber, Locator.cvNumberInput, 'css')
Ejemplo n.º 14
0
 def __init__(self, driver):
     self.driver = driver
     self.methods = Methods(self.driver)
Ejemplo n.º 15
0
 def getBalanceValue(self):
     methods = Methods(self.driver)
     return float(methods.getText(Locator.balance, 'css'))