Пример #1
0
    def purchaseInfo(self, customerName, contEmailRandom):
        driver = self.driver

        vatIDRandom = randomHelper.random_int_generator()
        driver.find_element_by_xpath(data.vatIDField).send_keys(vatIDRandom)

        # # Payment Terms select dd
        # fillingFunctions.selectDDRandomly(driver, data.paymentTermsDD, data.paymentTermsDDTitle)
        #
        # # Currency select dd
        # fillingFunctions.selectDDRandomly(driver, data.currencyDD, data.currencyDDTitle)

        # Price Model dd
        fillingFunctions.selectDDRandomly(driver, data.priceModelDD, data.priceModelDDTitle)


        self.saveCustomer(customerName, contEmailRandom, vatIDRandom)
Пример #2
0
    def fillingCustomerInfoFields(self):
        driver = self.driver

        #filling Customer Name field
        customerName = randomHelper.random_string_generator()
        driver.find_element_by_xpath(data.customerNameField).send_keys(customerName)

        #click on Status checkbox
        WebDriverWait(driver, 10).until(lambda driver : driver.find_element_by_xpath(data.statusCheckBox)).click()

        #select by Billing selected already

        #select random county by Billing Addresses
        fillingFunctions.selectDDRandomly(driver, data.counrtySDDListBilling, data.countrySelectDropDownTitleBilling)

        #filling Bill Address field
        randomBillAddressString = randomHelper.random_string_generator()
        randomBillAddressInt = randomHelper.random_int_generator()
        randomBillAddress = randomBillAddressString + ' ' + randomBillAddressInt
        driver.find_element_by_xpath(data.billAddressesField).send_keys(randomBillAddress)

        #select Shipping Addresses
        driver.find_element_by_xpath(data.addressesSelecrDropDown).click()
        driver.find_element_by_xpath(data.shippingAddressesXPath).click()

        driver.implicitly_wait(5)

        #select random country by Shipping Addresses
        fillingFunctions.selectDDRandomly(driver, data.counrtySDDListShipping, data.countrySelectDropDownTitleShipping)

        #filling Shipping Address field
        randomShippingAddressString = randomHelper.random_string_generator()
        randomShippingAddressInt = randomHelper.random_int_generator()
        randomShippingAddress = randomShippingAddressString + ' ' + randomShippingAddressInt
        driver.find_element_by_xpath(data.shippingAddressesField).send_keys(randomShippingAddress)

        #select random Customer Type
        fillingFunctions.selectDDRandomly(driver, data.customerTypeDropDown, data.customerTypeTitle)

        #select random Default Language
        fillingFunctions.selectDDRandomly(driver, data.defaultLanguageDropDown, data.defaultLanguageTitle)


        #filling Remarks field
        someRemarksStr = randomHelper.random_string_generator()
        someRemarksInt = randomHelper.random_int_generator()
        someRemarks = (someRemarksInt + ' ' + someRemarksStr + ' ') * 3
        driver.find_element_by_xpath(data.remarksField).send_keys(someRemarks)




        #Shipping Conditions
        self.shippinConditionMethod(customerName)