def _start_checkout(self): """ Begin the checkout process for a verified certificate. """ self.login_with_lms(self.email, self.password) if MARKETING_URL_ROOT: course_about_page = MarketingCourseAboutPage( self.browser, self.course_id) course_about_page.visit() # Click the first enroll button on the page to take the browser to the track selection page. course_about_page.q(css='.js-enroll-btn').first.click() # Wait for the track selection page to load. wait = WebDriverWait(self.browser, 10) track_selection_present = EC.presence_of_element_located( (By.CLASS_NAME, 'form-register-choose')) wait.until(track_selection_present) else: course_modes_page = LMSCourseModePage(self.browser, self.course_id) course_modes_page.visit() # Click the purchase button on the track selection page to take # the browser to the payment selection page. self.browser.find_element_by_css_selector( 'input[name=verified_mode]').click()
def _start_checkout(self): """ Begin the checkout process for a verified certificate. """ self.login_with_lms(self.email, self.password) # If a slug is provided, use the marketing site. if ENABLE_MARKETING_SITE: course_about_page = MarketingCourseAboutPage( self.browser, VERIFIED_COURSE_SLUG) course_about_page.visit() # Click the first enroll button on the page to take the browser to the track selection page. course_about_page.q(css='.js-enroll-btn').first.click() # Wait for the track selection page to load. WebDriverWait(self.browser, 10).until( EC.presence_of_element_located( (By.CLASS_NAME, 'form-register-choose'))) else: course_modes_page = LMSCourseModePage(self.browser, self.course_id) course_modes_page.visit() # Click the purchase button on the track selection page to take # the browser to the payment selection page. self.browser.find_element_by_css_selector( 'input[name=verified_mode]').click()
def _start_checkout(self): """ Begin the checkout process for a verified certificate. """ self.login_with_lms(self.email, self.password) course_modes_page = LMSCourseModePage(self.browser, self.course_id) course_modes_page.visit() # Click the purchase button on the track selection page to take # the browser to the payment selection page. course_modes_page.q(css='input[name=verified_mode]').click()
def _start_checkout(self): """ Begin the checkout process for a verified certificate. """ self.login_with_lms(self.email, self.password) if MARKETING_URL_ROOT: course_about_page = MarketingCourseAboutPage(self.browser, self.course_id) course_about_page.visit() # Click the first enroll button on the page to take the browser to the track selection page. course_about_page.q(css='.js-enroll-btn').first.click() # Wait for the track selection page to load. wait = WebDriverWait(self.browser, 10) track_selection_present = EC.presence_of_element_located((By.CLASS_NAME, 'form-register-choose')) wait.until(track_selection_present) else: course_modes_page = LMSCourseModePage(self.browser, self.course_id) course_modes_page.visit() # Click the purchase button on the track selection page to take # the browser to the payment selection page. self.browser.find_element_by_css_selector('input[name=verified_mode]').click()
def _start_checkout(self): """ Begin the checkout process for a verified certificate. """ self.login_with_lms(self.email, self.password) # If a slug is provided, use the marketing site. if ENABLE_MARKETING_SITE: course_about_page = MarketingCourseAboutPage(self.browser, VERIFIED_COURSE_SLUG) course_about_page.visit() # Click the first enroll button on the page to take the browser to the track selection page. course_about_page.q(css='.js-enroll-btn').first.click() # Wait for the track selection page to load. WebDriverWait(self.browser, 10).until( EC.presence_of_element_located((By.CLASS_NAME, 'form-register-choose')) ) else: course_modes_page = LMSCourseModePage(self.browser, self.course_id) course_modes_page.visit() # Click the purchase button on the track selection page to take # the browser to the payment selection page. self.browser.find_element_by_css_selector('input[name=verified_mode]').click()