コード例 #1
0
    def sps_testreload(self):


        print("============  Test Reload Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Test Reload Upsell banned words finish  ===============")


        time.sleep(10)

        parentHandle_test = self.driver.current_window_handle

        testButton_1 = self.driver.find_element(By.CSS_SELECTOR, ".plan_button.first-option")
        testButton_1.click()

        time.sleep(5)

        handles1 = self.driver.window_handles

        for handle in handles1:
            if handle not in parentHandle_test:
                self.driver.switch_to.window(handle)

        testButton_confirm = self.driver.find_element(By.CSS_SELECTOR, ".confirm.btn.btn-success")
        testButton_confirm.click()

        time.sleep(10)
コード例 #2
0
    def leptinShred_pass_aa40a(self):
        '''
        This will be ran for the aa40a funnel
        :return:
        '''

        print(
            "============  Leptin Shred Upsell Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print(
            "====== Leptin Shred Upsell banned words finish  ===============")

        parentHandle_Leptin = self.driver.current_window_handle

        addButtons_1st = self.driver.find_element(By.CSS_SELECTOR,
                                                  ".plan_button")
        addButtons_1st.click()

        time.sleep(1)

        handles2 = self.driver.window_handles

        for handle in handles2:
            if handle not in parentHandle_Leptin:
                self.driver.switch_to.window(handle)

        secondButtonConfirm = self.driver.find_element(
            By.CSS_SELECTOR, '.confirm.btn.btn-success')
        secondButtonConfirm.click()

        time.sleep(5)
コード例 #3
0
    def leptinShred_pass(self):

        print(
            "============  Leptin Shred Upsell Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print(
            "====== Leptin Shred Upsell banned words finish  ===============")

        parentHandle_Leptin = self.driver.current_window_handle

        # https://sixpackshortcuts.com/cart/customize/sps_leptinshred

        addButtons_1st = self.driver.find_element(By.ID, "upsell_1")
        addButtons_1st.click()

        #addButton1 = self.driver.find_element(By.ID, "upsell_1")
        #addButton1.click()
        time.sleep(3)

        handles2 = self.driver.window_handles

        for handle in handles2:
            if handle not in parentHandle_Leptin:
                self.driver.switch_to.window(handle)

        secondButtonConfirm = self.driver.find_element(
            By.XPATH, '//button[@class="confirm btn btn-success"]')
        secondButtonConfirm.click()

        time.sleep(3)
コード例 #4
0
    def cart_pass(self):

        time.sleep(4)

        cardType = Select(self.driver.find_element(By.ID, "creditcardtype"))
        cardType.select_by_value("amex")

        cc_number = self.driver.find_element(By.ID, "creditcardnumber")
        cc_number.send_keys("379568521301035")

        exp_Mo = Select(self.driver.find_element(By.ID, "expirationMonth"))
        exp_Mo.select_by_value("05")

        exp_Year = Select(self.driver.find_element(By.ID, "expirationYear"))
        exp_Year.select_by_value("22")

        sec_code = self.driver.find_element(By.ID, "CVV")
        sec_code.send_keys("9707")

        checkBox = self.driver.find_element(By.ID, "TrialAgreement")
        checkBox.click()

        submitButton = self.driver.find_element(By.NAME, "send")

        print("============  aa40 Cart Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40 Cart banned words finish  ===============")

        submitButton.click()

        time.sleep(15)
コード例 #5
0
    def sps_leptinshred(self):
        '''
        This will be ran for sixpackshortcuts2 funnel
        :param self:
        :return:
        '''

        print(
            "============  Leptin Shred Upsell Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print(
            "====== Leptin Shred Upsell banned words finish  ===============")

        parentHandle_Leptin = self.driver.current_window_handle

        addButtons_1st = self.driver.find_element(By.ID, "show_1st_modal")
        addButtons_1st.click()

        time.sleep(1)

        handles2 = self.driver.window_handles

        for handle in handles2:
            if handle not in parentHandle_Leptin:
                self.driver.switch_to.window(handle)

        secondButtonConfirm = self.driver.find_element(
            By.CSS_SELECTOR, '.confirm.btn.btn-success')
        secondButtonConfirm.click()
コード例 #6
0
    def alphaArmor_Pass(self):

        print(
            "============  AlphaArmor Upsell Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== AlphaArmor Upsell banned words finish  ===============")

        parentHandle_test = self.driver.current_window_handle

        testButton_1 = self.driver.find_element(By.CLASS_NAME, 'plan_button')
        testButton_1.click()

        time.sleep(5)

        handles1 = self.driver.window_handles

        for handle in handles1:
            if handle not in parentHandle_test:
                self.driver.switch_to.window(handle)

        testButton_confirm = self.driver.find_element(
            By.XPATH, '//button[@class="confirm btn btn-success"]')
        testButton_confirm.click()

        time.sleep(10)
コード例 #7
0
    def testRealoadPass(self):
        #https://sixpackshortcuts.com/cart/customize/sps_testreload
        #https://sixpackshortcuts.com/cart/customize/tmax_reload


        print("============  Test Reload Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Test Reload Upsell banned words finish  ===============")

        parentHandle_test = self.driver.current_window_handle

        testButton_1 = self.driver.find_element(By.ID, "upsell_1")
        testButton_1.click()

        time.sleep(5)

        handles1 = self.driver.window_handles

        for handle in handles1:
            if handle not in parentHandle_test:
                self.driver.switch_to.window(handle)


        testButton_confirm = self.driver.find_element(By.XPATH, "//*[@class='confirm btn btn-success']")
        testButton_confirm.click()

        time.sleep(10)
コード例 #8
0
    def testRealoadPass_aa40a(self):
        # https://sixpackshortcuts.com/cart/customize/sps_testreload
        # https://sixpackshortcuts.com/cart/customize/tmax_reload


        print("============  Test Reload Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Test Reload Upsell banned words finish  ===============")

        time.sleep(10)

        parentHandle_test = self.driver.current_window_handle

        testButton_1 = self.driver.find_element(By.CSS_SELECTOR, ".plan_button")
        testButton_1.click()

        time.sleep(5)

        handles1 = self.driver.window_handles

        for handle in handles1:
            if handle not in parentHandle_test:
                self.driver.switch_to.window(handle)

        testButton_confirm = self.driver.find_element(By.CSS_SELECTOR, ".confirm.btn.btn-success")
        testButton_confirm.click()

        time.sleep(10)
コード例 #9
0
ファイル: sps_index.py プロジェクト: lmayfield78/python
    def spsIndexPass(self):
        firstButton = self.driver.find_element(By.ID, "1st_cta")

        print("============  SPS Index Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("========= SPS Index banned words finish  ===============")
        firstButton.click()
コード例 #10
0
    def testMax_normal_button(self):

        clickHereButton = self.driver.find_element(By.ID, 'video')

        print("============  Tmax Index Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Tmax Index banned words finish  ===============")
        clickHereButton.click()
コード例 #11
0
    def aa40Upsell_sbsp(self):
        print("============  aa40_sbsp Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40_Index banned words finish  ===============")

        #Bugged https://trello.com/c/qO3xlPYy/1404-request-add-id-to-button
        upgradeButton = self.driver.find_element(By.CLASS_NAME, "buybutton")
        upgradeButton.click()
コード例 #12
0
    def aa40Upsell_normal(self):
        print("============  aa40 Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40_Index banned words finish  ===============")

        getButton = self.driver.find_element(By.LINK_TEXT,
                                             'Get Abs After 40 Now!')
        getButton.click()
        time.sleep(6)
コード例 #13
0
    def leptin_index_clickhere(self):

        #click here button
        clickhereButton = self.driver.find_element(By.ID, "video-btn")

        print("============  Leptin Index Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Leptin Index banned words finish  ===============")
        clickhereButton.click()
コード例 #14
0
ファイル: aa40a_Upsell.py プロジェクト: lmayfield78/python
    def aa40aUpsell_pass(self):

        print("============  aa40s_Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40s_Upsell banned words finish  ===============")

        addButton = self.driver.find_element(By.ID, "purchase")
        addButton.click()

        time.sleep(10)
コード例 #15
0
ファイル: doneforyoudiet.py プロジェクト: lmayfield78/python
    def doneforyoudiet_normal(self):


        print("============  Done for you diet Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Done for you diet banned words finish  ===============")

        button = self.driver.find_element(By.CSS_SELECTOR, ".buy-it-now-box.center-block>a>img")
        button.click()
        time.sleep(3)
コード例 #16
0
    def sixpackshortcuts_normal_upsell(self):

        print("============  sps upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== sps upsell banned words finish  ===============")

        button = self.driver.find_element(By.CSS_SELECTOR, ".text-center>img")
        button.click()

        time.sleep(4)
コード例 #17
0
    def acceleratedabs_normal(self):


        print("============  acc_abs Upsell Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== acc_abs Upsell banned words finish  ===============")

        button = self.driver.find_element(By.CSS_SELECTOR, ".buybutton>img")
        button.click()

        time.sleep(4)
コード例 #18
0
 def sbsp_index_button(self):
     '''
     Button click to move to step 2
     :return:
     '''
     button = self.driver.find_element(By.ID, "video")
     print("============  sbsp_Index Banned words Start ===============")
     go = Text(self.driver)
     go.bannedWords(self.driver)
     print("====== sbsp_Index banned words finish  ===============")
     button.click()
     time.sleep(3)
コード例 #19
0
    def qualifyClick(self):

        light = self.driver.find_element(By.CLASS_NAME, "lightSwitcher")
        light.click()

        time.sleep(3)

        qualifyButton = self.driver.find_element(By.CSS_SELECTOR, ".btn.btn-success.btn-block")
        print("============  aa40Advanced Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40Advanced banned words finish  ===============")
        qualifyButton.click()
コード例 #20
0
    def insanehomefatloss_upsell(self):

        print(
            "============  insanehomefatloss upsell Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print(
            "====== insanehomefatloss upsell banned words finish  ==============="
        )

        button = self.driver.find_element(By.CSS_SELECTOR, ".text-center>img")
        button.click()
        time.sleep(5)
コード例 #21
0
    def leptin_step2_normal(self):

        time.sleep(2)

        #first name
        firstname = self.driver.find_element(By.ID, "first_name")
        firstname.send_keys("Lawrence")

        #last name
        lastname = self.driver.find_element(By.ID, "last_name")
        lastname.send_keys("Mayfield")

        #email
        email = self.driver.find_element(By.ID, "email")
        email.send_keys("*****@*****.**")

        #phone
        phone = self.driver.find_element(By.ID, "phone")
        phone.send_keys("512123456")

        #address
        address = self.driver.find_element(By.ID, "shipping_address")
        address.send_keys("911 Research Blvd")

        #country
        country = Select(self.driver.find_element(By.ID, "shipping_country"))
        country.select_by_value("226")

        #state
        state = Select(self.driver.find_element(By.ID, "shipping_state"))
        state.select_by_value("Texas")

        #city
        city = self.driver.find_element(By.ID, "shipping_city")
        city.send_keys("Austin")

        #zip code
        zipcode = self.driver.find_element(By.ID, "shipping_zipcode")
        zipcode.send_keys("78758")

        #click here button
        button = self.driver.find_element(By.ID, "submit_button")


        print("============  leptin shred 2 Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== leptin shred 2 banned words finish  ===============")

        button.click()
コード例 #22
0
    def indexClick(self):
        '''
        This function only clicks the button that takes users to the step 2 page.
        :return:
        '''

        #This will click the first / top "Get abs after 40 now" button.

        getAbsButton1 = self.driver.find_element(
            By.CSS_SELECTOR, "a.btn.btn-green.btn-block.btn-qualify")
        print("============  aa40_Index Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40_Index banned words finish  ===============")
        getAbsButton1.click()
コード例 #23
0
    def normalSurvey(self):

        time.sleep(1)

        #firstname
        first_name = self.driver.find_element(By.ID, "first_name")
        first_name.send_keys('Lawrence')

        #lastname
        last_name = self.driver.find_element(By.ID, "last_name")
        last_name.send_keys("Mayfield")

        #email
        email = self.driver.find_element(By.ID, "email")
        email.send_keys("*****@*****.**")

        #phone
        phone = self.driver.find_element(By.ID, "phone")
        phone.send_keys('1234567890')

        #address
        address = self.driver.find_element(By.ID, "shipping_address")
        address.send_keys("9111 Research Blvd")

        #country
        country = Select(self.driver.find_element(By.ID, "shipping_country"))
        country.select_by_value("226")

        #state
        statedrop = Select(self.driver.find_element(By.ID, "shipping_state"))
        statedrop.select_by_value("Texas")

        #city
        city = self.driver.find_element(By.ID, "shipping_city")
        city.send_keys("Austin")

        #zipcode
        zipcode = self.driver.find_element(By.ID, "shipping_zipcode")
        zipcode.send_keys("78758")

        #claim Button click
        submitButton = self.driver.find_element(By.ID, "submit_button")

        print("============  aa40a_step2 Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== aa40a_step2 banned words finish  ===============")
        submitButton.click()
コード例 #24
0
    def testReload_step2_normal(self):

        time.sleep(10)

        # Agree button
        agreeButton = self.driver.find_element(By.ID, "trial_agreement")
        agreeButton.click()

        # User Info
        firstName = self.driver.find_element(By.ID, "first_name")
        firstName.send_keys("Lawrence")

        lastName = self.driver.find_element(By.ID, "last_name")
        lastName.send_keys("Mayfield")

        email = self.driver.find_element(By.ID, "email")
        email.send_keys("*****@*****.**")

        phone = self.driver.find_element(By.ID, "phone")
        phone.send_keys("5121231234")

        address = self.driver.find_element(By.ID, "shipping_address")
        address.send_keys("911 Research Blvd")

        country = Select(self.driver.find_element(By.ID, "shipping_country"))
        country.select_by_value("226")

        state = Select(self.driver.find_element(By.ID, "shipping_state"))
        state.select_by_value("Texas")

        city = self.driver.find_element(By.ID, "shipping_city")
        city.send_keys("Austin")

        zipcode = self.driver.find_element(By.ID, "shipping_zipcode")
        zipcode.send_keys("78758")

        # Claim Button
        claimButton = self.driver.find_element(By.ID, "submit_button")

        print(
            "============  Test Reload step 2 Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Test Reload step 2 banned words finish  ===============")

        claimButton.click()
コード例 #25
0
    def testReload_index_claim(self):

        # this turns the lights on
        lightsOff = self.driver.find_element(By.CSS_SELECTOR,
                                             ".btn.btn-primary.toggle-on")
        lightsOff.click()

        time.sleep(1)

        claimButton = self.driver.find_element(By.CSS_SELECTOR, "#form")
        print(
            "============  Test Reload Index Banned words Start ==============="
        )
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== Test Reload Index banned words finish  ===============")
        claimButton.click()
コード例 #26
0
    def spsStep2Pass(self):

        time.sleep(2)
        firstname = self.driver.find_element(By.ID, "first_name")
        firstname.send_keys("Lawrence")

        lastname = self.driver.find_element(By.ID, "last_name")
        lastname.send_keys("Mayfield")

        email = self.driver.find_element(By.ID, "email")
        email.send_keys("*****@*****.**")

        phone = self.driver.find_element(By.ID, "phone")
        phone.send_keys("1234567890")

        address = self.driver.find_element(By.ID, "shipping_address")
        address.send_keys("9111 Research Blvd.")

        countryDropdown = Select(
            self.driver.find_element(By.ID, "shipping_country"))
        countryDropdown.select_by_value("226")

        statedrop = Select(self.driver.find_element(By.ID, "shipping_state"))
        statedrop.select_by_value("Texas")

        city = self.driver.find_element(By.ID, "shipping_city")
        city.send_keys("Austin")

        zipCode = self.driver.find_element(By.ID, "shipping_zipcode")
        zipCode.send_keys("78758")

        agreeTerms = self.driver.find_element(By.ID, "trial_agreement")
        agreeTerms.click()

        claimButton = self.driver.find_element(By.ID, "submit_button")

        from tools.text_search import Text
        print("============  sps step 2 Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== sps step 2 banned words finish  ===============")

        claimButton.click()
コード例 #27
0
    def tmax_normal_pass(self):

        time.sleep(2)

        firstName = self.driver.find_element(By. ID, 'first_name')
        firstName.send_keys('Lawrence')

        lastName = self.driver.find_element(By.ID, 'last_name')
        lastName.send_keys("Mayfield")

        email = self.driver.find_element(By.ID, 'email')
        email.send_keys('*****@*****.**')

        phone = self.driver.find_element(By.ID, 'phone')
        phone.send_keys('1231231230')

        address = self.driver.find_element(By.ID, 'shipping_address')
        address.send_keys('9111 Research Blvd')

        countryDropdown = Select(self.driver.find_element(By.ID, "shipping_country"))
        countryDropdown.select_by_value("226")

        stateDrop = Select(self.driver.find_element(By.ID, "shipping_state"))
        stateDrop.select_by_value("Texas")

        city = self.driver.find_element(By.ID, "shipping_city")
        city.send_keys("Austin")

        zipcode = self.driver.find_element(By.ID, 'shipping_zipcode')
        zipcode.send_keys('78758')

        submit_button = self.driver.find_element(By.ID, 'submit_button')


        print("============  testmax step 2 Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== testmax step 2 banned words finish  ===============")

        submit_button.click()
コード例 #28
0
    def sixpacksleep_Pass(self):


        print("============  sixpack sleep Banned words Start ===============")
        go = Text(self.driver)
        go.bannedWords(self.driver)
        print("====== sixpack sleep banned words finish  ===============")

        parentHandle_test = self.driver.current_window_handle

        testButton_1 = self.driver.find_element(By.CSS_SELECTOR, ".plan_button")
        testButton_1.click()


        handles1 = self.driver.window_handles

        for handle in handles1:
            if handle not in parentHandle_test:
                self.driver.switch_to.window(handle)

        testButton_confirm = self.driver.find_element(By.CSS_SELECTOR, '.confirm.btn.btn-success')
        testButton_confirm.click()

        time.sleep(10)