コード例 #1
0
ファイル: test_contest.py プロジェクト: lorenzorivas/omegaup
def add_students_contest(driver, users):
    '''Add students to a recently contest.'''

    util.add_students(
        driver, users, container_id='contestants',
        parent_xpath='*[@id="contestants"]',
        submit_locator=(By.CLASS_NAME, 'user-add-single'))
コード例 #2
0
def add_students_course(driver, users):
    '''Add students to a recently course.'''

    util.add_students(
        driver, users, selector='students',
        typeahead_helper='.omegaup-course-addstudent',
        submit_locator=(By.CSS_SELECTOR,
                        '.omegaup-course-addstudent form button[type=submit]'))
コード例 #3
0
ファイル: test_contest.py プロジェクト: mauroj92/omegaup
def add_students_contest(driver, users):
    '''Add students to a recently contest.'''

    util.add_students(driver,
                      users,
                      selector='#contestants',
                      typeahead_helper='#contestants',
                      submit_locator=(By.CLASS_NAME, 'user-add-single'))
コード例 #4
0
def add_students_course(driver, users):
    '''Add students to a recently course.'''

    util.add_students(
        driver, users, tab_xpath='//a[contains(@href, "#students")]',
        container_xpath='//*[@id="students"]',
        parent_xpath='*[contains(@class, "omegaup-course-addstudent")]',
        submit_locator=(By.CSS_SELECTOR,
                        '.omegaup-course-addstudent form button[type=submit]'))
コード例 #5
0
ファイル: test_contest.py プロジェクト: lhchavez/omegaup
def add_students_contest(driver, users):
    '''Add students to a recently contest.'''

    util.add_students(
        driver, users,
        tab_xpath='//li[contains(@class, "contestants")]//a',
        container_xpath='//div[contains(@class, "contestants-input-area")]',
        parent_xpath='div[contains(@class, "contestants")]',
        submit_locator=(By.CLASS_NAME, 'user-add-single'))
コード例 #6
0
ファイル: test_contest.py プロジェクト: gabrc52/omegaup
def add_students_contest(driver, users):
    '''Add students to a recently contest.'''

    util.add_students(
        driver, users,
        tab_xpath='//li[contains(@class, "contestants")]//a',
        container_xpath='//div[contains(@class, "contestants-input-area")]',
        parent_xpath='div[contains(@class, "contestants")]',
        submit_locator=(By.CLASS_NAME, 'user-add-single'))
コード例 #7
0
ファイル: test_course.py プロジェクト: lhchavez/omegaup
def add_students_course(driver, users):
    '''Add students to a recently course.'''

    util.add_students(
        driver, users, tab_xpath='//a[contains(@href, "#students")]',
        container_xpath='//*[@id="students"]',
        parent_xpath='*[contains(@class, "omegaup-course-addstudent")]',
        submit_locator=(By.CSS_SELECTOR,
                        '.omegaup-course-addstudent form button[type=submit]'))
コード例 #8
0
def add_students_course(driver, users):
    '''Add students to a recently course.'''

    util.add_students(
        driver,
        users,
        tab_xpath='//a[contains(@href, "#students")]',
        container_xpath='//div[@data-students-tab]',
        parent_selector='.omegaup-course-addstudent',
        add_button_locator=(
            By.CSS_SELECTOR,
            '.omegaup-course-addstudent form button.add-participant'),
        submit_locator=(By.CSS_SELECTOR,
                        '.omegaup-course-addstudent form button[type=submit]'))
コード例 #9
0
ファイル: test_contest.py プロジェクト: zulygs/omegaup
def add_students_contest(driver, users):
    '''Add students to a recently contest.'''

    driver.wait.until(
        EC.element_to_be_clickable(
            (By.CSS_SELECTOR, 'a[data-nav-contest-edit]'))).click()
    driver.wait.until(
        EC.visibility_of_element_located(
            (By.XPATH, '//a[@data-nav-contestant]')))
    util.add_students(
        driver,
        users,
        tab_xpath='//a[@data-nav-contestant]',
        container_xpath='//div[contains(@class, "contestants-input-area")]',
        parent_xpath='div[contains(@class, "contestants")]',
        submit_locator=(By.CLASS_NAME, 'user-add-single'))