def test_bank_admin_user_able_to_create_all_bankusers(self):
        self.login.loginToApplication(
            ApplicationConfig.get('BANKADMIN_USERID'),
            ApplicationConfig.get('BANKADMIN_PASSWORD'))
        self.home.verifyWelcomeMessage(
            ApplicationConfig.get('BANKADMIN_USERID'))
        self.home.navigateToAdmin()
        self.status.mark(self.bankUser.verifyAddUserButtonNotDisplayed(),
                         "Incorrect Match")

        self.bankUser.createUsers(userProfileTestData.df_BankRead)
        self.bankUser.searchUser(
            userProfileTestData.df_BankRead[self.home.labelsOnUI['UserID']][0])
        result = self.bankUser.verifyDetails(userProfileTestData.df_BankRead)
        self.status.mark(result, "Incorrect Match")

        self.bankUser.createUsers(userProfileTestData.df_BankUpdate)
        self.bankUser.searchUser(userProfileTestData.df_BankUpdate[
            self.home.labelsOnUI['UserID']][0])
        result = self.bankUser.verifyDetails(userProfileTestData.df_BankUpdate)
        self.status.mark(result, "Incorrect Match")
        self.home.userLogout()
        self.status.markFinal(
            "test_bank_admin_user_able_to_create_all_bankusers", result,
            "Verification is Successful")
 def test_createAllBankUsers(self):
     self.login.loginToApplication(
         ApplicationConfig.get('BANKADMIN_USERID'),
         ApplicationConfig.get('BANKADMIN_PASSWORD'))
     self.home.verifyWelcomeMessage(
         ApplicationConfig.get('BANKADMIN_USERID'))
     self.home.navigateToAdmin()
     self.bankUser.createUsers(userProfileTestData.df_BankAdmin)
     self.bankUser.searchUser(userProfileTestData.df_BankAdmin[
         self.home.labelsOnUI['UserID']][0])
     result = self.bankUser.verifyDetails(userProfileTestData.df_BankAdmin)
     self.status.mark(result, "Incorrect Match")
 def test_searchCustomerAndClick(self):
     result = False
     self.login.loginToApplication(ApplicationConfig.get('UserId'), ApplicationConfig.get('Password'))
     # self.home.verifyWelcomeMessage( ApplicationConfig.get( 'UserId' ) )
     # self.status.mark(result, "Incorrect match")
     self.home.navigateToRootCustomers()
     companyList = inputCustomerTest.df_Singlecustomer
     customerName = companyList['Subentity'][0]
     customerName = '01PKTESTCUST'
     self.globalSearch.searchAccountOrCustomerAndClick(self.home.labelsOnUI['GlobalSearchType_Company'],
                                                       customerName)
     self.home.verifyRootCustomerLabelOnCompanyPage(customerName)
     self.overview.verifyCustomerDetails(companyList)
Exemplo n.º 4
0
 def test_transaction_posting_in_hierarchy(self):
     self.login.loginToApplication(ApplicationConfig.get('UserId'),
                                   ApplicationConfig.get('Password'))
     # self.home.verifyWelcomeMessage(ApplicationConfig.get('firstname'))
     self.home.navigateToRootCustomers()
     accountList = inputCustomerTest.df_accounts
     self.globalSearch.searchAccountOrCustomerAndClick('SHA17669158142855')
     self.camtFile.generateCAMT053('SHA17669158142855', 'VTA24944452783067',
                                   inputCustomerTest.camtinput)
     self.camtFile.ftpCAMT053Files()
     self.camtFile.generateCAMT053('SHA17669158142855', 'VTA24944452783067',
                                   inputCustomerTest.camtinput)
     self.camtFile.ftpCAMT053Files()
     self.transaction.navigateToTransactions()
     self.home.userLogout()
Exemplo n.º 5
0
    def getWebDriverInstance(self):
        """
       Get WebDriver Instance based on the browser configuration

        Returns:
            'WebDriver Instance'
        """
        baseURL = ApplicationConfig.get('APP_URL')
        if self.browser == "iexplorer":
            # Set ie driver
            Iedriver = "drivers/IEDriverServer.exe"
            driver = webdriver.Ie(Iedriver)
        elif self.browser == "firefox":
            driver = webdriver.Firefox()
        elif self.browser == "chrome":
            # Set chrome driver
            chromedriver = "/drivers/chromedriver.exe"
            os.environ["webdriver.chrome.driver"] = chromedriver
            driver = webdriver.Chrome(chromedriver)
            driver.set_window_size(1440, 900)
        else:
            # driver = webdriver.Firefox()
            driver = webdriver.Chrome(
                executable_path=os.environ.get('myHome') +
                "drivers/chromedriver.exe")
        # Setting Driver Implicit Time out for An Element
        driver.implicitly_wait(3)
        # Maximize the window
        driver.maximize_window()
        # Loading browser with App URL
        driver.get(baseURL)
        return driver
    def createParam(self, outputFileName):
        document = Element("Head")
        # tree = ElementTree(document)
        tree = etree.ElementTree(document)

        a1 = Element("a1")
        a1.text = "xxxxxx"  # CAMT053FileProcessing.custID
        document.append(a1)

        CAMT053InputData.BICOrBEI = ApplicationConfig.get('BICOrBEI')
        a2 = Element("a2")
        a2.text = CAMT053InputData.BICOrBEI
        document.append(a2)

        a4 = Element("a4")
        a4.text = CAMT053InputData.camtFormat
        document.append(a4)

        incomingPath = ApplicationConfig.get(
            'INCOMINGFILEPATH') + '/' + outputFileName + ".att"
        a9 = Element("a9")
        a9.text = incomingPath
        document.append(a9)

        a10 = Element("a10")
        a10.text = outputFileName
        document.append(a10)

        a20 = Element("a20")
        a20.text = "VAM"
        document.append(a20)


        CAMT053FileProcessing.paramFilePath = CAMT053FileProcessing.path + "\\inputCAMT&PAIN\\" + \
                                              CAMT053FileProcessing.outputFileName + ".param"

        tempFileName = CAMT053FileProcessing.path + "\\inputCAMT&PAIN\\TempFile" + ".param"

        tree.write(open(tempFileName, 'wb'))
        line = ""
        file = open(tempFileName)
        for line in file:
            line = line.replace('<Head>', '')
            line = line.replace('</Head>', '')
        file.close()

        vkb.xml(line, CAMT053FileProcessing.paramFilePath)
Exemplo n.º 7
0
 def test_create_account_hierarchy(self):
     # if inputCustomerTest.checkRunMode('test_create_account_hierarchy') == True:
     self.login.loginToApplication(ApplicationConfig.get('UserId'),
                                   ApplicationConfig.get('Password'))
     # self.home.verifyWelcomeMessage(ApplicationConfig.get('firstname'))
     self.home.navigateToRootCustomers()
     # self.rootCustomer.clickOnAddRootCustomerButton()
     # companyList = inputCustomerTest.df_Singlecustomer
     # self.company.createCustomerHierarchy(companyList)
     # self.company.activateCustomer(companyList.loc[0]['Subentity'])
     self.globalSearch.searchAccountOrCustomerAndClick(
         inputCustomerTest.nameofCustomer,
         self.home.labelsOnUI['GlobalSearchType_Company'])
     self.home.navigateToAccounts()
     self.account.clickOnAddRootAccountButton()
     accountList = inputCustomerTest.df_accounts
     self.account.createAccountHierarchy(accountList)
     self.account.activateAccount(accountList.loc[0]['Name of the account'])
     self.home.userLogout()
Exemplo n.º 8
0
    def test_trialclosed_account_in_hierarchy(self):
        #if inputCustomerTest.checkRunMode('test_create_account_hierarchy') == True:
        self.login.loginToApplication(ApplicationConfig.get('UserId'),
                                      ApplicationConfig.get('Password'))
        # self.home.verifyWelcomeMessage(ApplicationConfig.get('firstname'))
        self.home.navigateToRootCustomers()
        accountList = inputCustomerTest.df_accounts
        newAccountDetails = inputCustomerTest.createDuplicate(
            inputCustomerTest.nameofAggregationAccounts[0])
        self.globalSearch.searchAccountOrCustomerAndClick(
            inputCustomerTest.nameofAggregationAccounts[0])
        self.account.clickOnParentAccountToAddChild(
            inputCustomerTest.nameofAggregationAccounts[0])
        newAccountDetails = inputCustomerTest.createDuplicate(
            inputCustomerTest.nameofAggregationAccounts[0])
        self.account.fill_Account_Details(newAccountDetails, 0)
        self.account.clickOnSuccessAccountButton()
        self.account.activateAccount(
            newAccountDetails[self.home.labelsOnUI['NameOfTheAccount']][0])
        self.globalSearch.searchAccountOrCustomerAndClick(
            newAccountDetails[self.home.labelsOnUI['NameOfTheAccount']][0])
        self.overview.clickOnOptionsInActionTab(
            self.home.labelsOnUI['lblBlockAccountPopUp'])
        self.status.mark(
            self.overview.verifyAccountBlockedBasedOnInput(
                self.overview.blockedCreditRadio), "Incorrect match")
        self.status.mark(
            self.account.verifyAccountStatus(
                self.home.labelsOnUI['custStatus_Blocked']), "Incorrect match")

        self.camtFile.generateCAMT053(
            inputCustomerTest.ShadowAccountNumber[0],
            newAccountDetails[self.home.labelsOnUI['NameOfTheAccount']][0],
            inputCustomerTest.camtinput)
        self.camtFile.ftpCAMT053Files()
        self.camtFile.generateCAMT053(
            inputCustomerTest.ShadowAccountNumber[0],
            newAccountDetails[self.home.labelsOnUI['NameOfTheAccount']][0],
            inputCustomerTest.camtinput)
        self.camtFile.ftpCAMT053Files()
        self.transaction.navigateToTransactions()
        self.home.userLogout()
 def test_CreateCustUsers_And_ViewUsers(self):
     self.login.loginToApplication(
         ApplicationConfig.get('BANKADMIN_USERID'),
         ApplicationConfig.get('BANKADMIN_PASSWORD'))
     #self.home.verifyWelcomeMessage( ApplicationConfig.get( 'UserId' ) )
     self.home.navigateToAdmin()
     userList = inputCustomerTest.df_CustUsers
     self.UsersABO = self.bankUser.createUsers(userList.loc[0])
     # print(self.UsersABO)
     self.bankUser.searchUser(self.UsersABO)
     result = self.bankUser.verifyAdminUserDetails(self.UsersABO)
     self.status.mark(result, "Incorrect Match")
     self.home.userLogout()
     self.login.loginToApplication(self.UsersABO.get('User ID'),
                                   self.UsersABO.get('Password'))
     result = self.home.verifyWelcomeMessage(
         self.UsersABO.get('First name'))
     self.status.mark(result, "Incorrect Match")
     self.home.userLogout()
     self.status.markFinal("test_CreateBankAdminUser_And_ViewUser", result,
                           "Verification is Successful")
    def test_HierarchyBalances(self):
        result = False
        self.login.loginToApplication(ApplicationConfig.get('UserId'), ApplicationConfig.get('Password'))
        # self.home.verifyWelcomeMessage( ApplicationConfig.get( 'UserId' ) )
        # self.status.mark(result, "Incorrect match")

        self.home.navigateToRootCustomers()
        self.rootCustomer.clickOnAddRootCustomerButton()
        companyList = inputCustomerTest.df_Singlecustomer
        self.company.createCustomerHierarchy(companyList)
        self.company.activateCustomer(companyList.loc[0]['Subentity'])
        self.home.navigateToAccounts()
        self.account.clickOnAddRootAccountButton()
        accountList = inputCustomerTest.df_accounts_HB
        data = self.account.createAccountHierarchy(accountList)
        self.account.activateAccount(accountList.loc[0]['Name of the account'])
        self.home.navigateToReports()
        self.hierarchyBal.verifyDefaultHierarchyBalances()

        self.home.userLogout()
        print('TTTTTTTT')
    def ftpCAMT053Files(self):
        SERVERIPADDR = ApplicationConfig.get('SERVERIPADDR')
        FTP_USERID = ApplicationConfig.get('FTP_USERID')
        FTP_PASSWORD = ApplicationConfig.get('FTP_PASSWORD')
        LOCAL_CAMTPATH = CAMT053FileProcessing.camtFilepath
        LOCAL_PARAMPATH = CAMT053FileProcessing.paramFilePath
        INCOMINGFILEPATH = ApplicationConfig.get('INCOMINGFILEPATH')
        INCOMINGFILEPATH = INCOMINGFILEPATH + '/' + CAMT053FileProcessing.outputFileName

        if ApplicationConfig.get('SERVER_TYPE') == 'FTP':
            CAMT053FileProcessing.ftpUtils.sendFileToFTPServer(
                SERVERIPADDR, FTP_USERID, FTP_PASSWORD, LOCAL_CAMTPATH,
                INCOMINGFILEPATH)
        else:
            CAMT053FileProcessing.ftpUtils.sendFileToSFTPServer(
                SERVERIPADDR, FTP_USERID, FTP_PASSWORD, LOCAL_CAMTPATH,
                INCOMINGFILEPATH + '.att')
            CAMT053FileProcessing.ftpUtils.sendFileToSFTPServer(
                SERVERIPADDR, FTP_USERID, FTP_PASSWORD, LOCAL_PARAMPATH,
                INCOMINGFILEPATH + '.param')

        self.deleteFiles()
Exemplo n.º 12
0
 def test_login_valid(self):
     self.login.loginToApplication( ApplicationConfig.get( 'UserId' ), ApplicationConfig.get( 'Password' ) )
     self.home.verifyWelcomeMessage( ApplicationConfig.get( 'UserId' ) )
     self.home.userLogout()