def actionsWithOrdersManagement(self, fn, ln, ph, em, randomCountry, comp, jobT, typeCustomer):
        driver = self.driver
        print('------Actions with Orders Management------')

        #orders button clicking on management panel
        driver.find_element_by_xpath(Data.boOrdersButton).click()

        #orders management button clicking
        driver.find_element_by_xpath(Data.boOrdersManagementButton).click()
        time.sleep(1)
        #make refactoring after id will be available

        #search by first name
        searchFunctions.searchForBOFields(driver, Data.ordersManageSearchButton, Data.boBillingFNameField, fn, Data.ordersEmptyTable,
                          Data.ordersResultFirstName,Data.ordersFirstNameColumnName, Data.boOrdersResetButton)

        #search by last name
        searchFunctions.searchForBOFields(driver, Data.ordersManageSearchButton, Data.boBillingLNameField, ln, Data.ordersEmptyTable,
                          Data.ordersResultLastName, Data.ordersLastNameColumnName, Data.boOrdersResetButton)

        #search by company
        searchFunctions.searchForBOFields(driver, Data.ordersManageSearchButton, Data.boBillingCompanyField, comp, Data.ordersEmptyTable,
                          Data.ordersResultCompany, Data.ordersCompanyColumnName, Data.boOrdersResetButton)

         #search by Created At field
        self.searchByDate()
Пример #2
0
    def actionsWithOrdersManagement(self, fn, ln, ph, em, randomCountry, comp,
                                    jobT, typeCustomer):
        driver = self.driver
        print('------Actions with Orders Management------')

        #orders button clicking on management panel
        driver.find_element_by_xpath(Data.boOrdersButton).click()

        #orders management button clicking
        driver.find_element_by_xpath(Data.boOrdersManagementButton).click()
        time.sleep(1)
        #make refactoring after id will be available

        #search by first name
        searchFunctions.searchForBOFields(
            driver, Data.ordersManageSearchButton, Data.boBillingFNameField,
            fn, Data.ordersEmptyTable, Data.ordersResultFirstName,
            Data.ordersFirstNameColumnName, Data.boOrdersResetButton)

        #search by last name
        searchFunctions.searchForBOFields(
            driver, Data.ordersManageSearchButton, Data.boBillingLNameField,
            ln, Data.ordersEmptyTable, Data.ordersResultLastName,
            Data.ordersLastNameColumnName, Data.boOrdersResetButton)

        #search by company
        searchFunctions.searchForBOFields(
            driver, Data.ordersManageSearchButton, Data.boBillingCompanyField,
            comp, Data.ordersEmptyTable, Data.ordersResultCompany,
            Data.ordersCompanyColumnName, Data.boOrdersResetButton)

        #search by Created At field
        self.searchByDate()
    def checkRandomFields(self, fn, ln, ph, em, randomCountry, comp, jobT, typeCustomer):
        driver = self.driver

        #search by first name
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.fnBoField, fn, Data.emptyTableClicking,
                          Data.boFirstNameForChecking, Data.boFirtsNameColumnName, Data.cusManageResetButton)

        #search by last name
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.lnBoField, ln, Data.emptyTableClicking,
                          Data.boLastNameForChecking, Data.boLastNameColumnName, Data.cusManageResetButton)

        #search by phone
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.phoneBOField, ph, Data.emptyTableClicking,
                          Data.boPhoneForChecking, Data.boPhoneColumnName, Data.cusManageResetButton)

        #search by email
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.emailBoField, em, Data.emptyTableClicking,
                          Data.boEmailForChecking, Data.boEmailColumnName, Data.cusManageResetButton)

        #search by country
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.countryBoField, randomCountry, Data.emptyTableClicking,
                          Data.boCountryForChecking, Data.boCountryColumnName, Data.cusManageResetButton)

        #search by company
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.companyBOField, comp, Data.emptyTableClicking,
                          Data.boCompanyForChecking, Data.boCompanyColumnName, Data.cusManageResetButton)

        #search by job title
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton, Data.jobTitleBOField, jobT, Data.emptyTableClicking,
                          Data.boJobTitleForChecking, Data.boJobTitleColumnName, Data.cusManageResetButton)



        self.checkRandomDropdownSelects(fn, ln, ph, em, randomCountry, comp, jobT, typeCustomer)
Пример #4
0
    def checkRandomFields(self, fn, ln, ph, em, randomCountry, comp, jobT,
                          typeCustomer):
        driver = self.driver

        #search by first name
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.fnBoField, fn,
                                          Data.emptyTableClicking,
                                          Data.boFirstNameForChecking,
                                          Data.boFirtsNameColumnName,
                                          Data.cusManageResetButton)

        #search by last name
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.lnBoField, ln,
                                          Data.emptyTableClicking,
                                          Data.boLastNameForChecking,
                                          Data.boLastNameColumnName,
                                          Data.cusManageResetButton)

        #search by phone
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.phoneBOField, ph,
                                          Data.emptyTableClicking,
                                          Data.boPhoneForChecking,
                                          Data.boPhoneColumnName,
                                          Data.cusManageResetButton)

        #search by email
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.emailBoField, em,
                                          Data.emptyTableClicking,
                                          Data.boEmailForChecking,
                                          Data.boEmailColumnName,
                                          Data.cusManageResetButton)

        #search by country
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.countryBoField, randomCountry,
                                          Data.emptyTableClicking,
                                          Data.boCountryForChecking,
                                          Data.boCountryColumnName,
                                          Data.cusManageResetButton)

        #search by company
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.companyBOField, comp,
                                          Data.emptyTableClicking,
                                          Data.boCompanyForChecking,
                                          Data.boCompanyColumnName,
                                          Data.cusManageResetButton)

        #search by job title
        searchFunctions.searchForBOFields(driver, Data.cusManageSearchButton,
                                          Data.jobTitleBOField, jobT,
                                          Data.emptyTableClicking,
                                          Data.boJobTitleForChecking,
                                          Data.boJobTitleColumnName,
                                          Data.cusManageResetButton)

        self.checkRandomDropdownSelects(fn, ln, ph, em, randomCountry, comp,
                                        jobT, typeCustomer)