コード例 #1
0
def clear_filters_alt(driver):
    """function selects the alternative Clear Filters button (inside the Filter Panel next to the
    Apply Filters button)and waits for VFL records to load"""
    expand_filters(driver)
    common_page_objects.click_button(
        driver, "//*[@id='dtFilterFormContainerVfl']/div/div/div/a[1]")
    wait_for_vfl_records(driver)
コード例 #2
0
def add_vfl_act(driver, radio, act_type):
    """Add a VFL act. Object expects "radio" int parameter which is converted to a string to complete the xpath
    locator. 1 = Safe & 2 = Unsafe. Second parameter expects a string and is used to select the act type from the
    dropdown. The act type should be sourced from the client variables file"""
    radio_string = str(radio)
    function_module.wait_for_element_XPATH(driver, "//*[@id='formActs']/div/section[1]/div/label["+radio_string+"]/i")
    driver.find_element_by_xpath("//*[@id='formActs']/div/section[1]/div/label["+radio_string+"]/i").click()
    Select(driver.find_element_by_xpath("//*[@id='Acts']")).select_by_visible_text(act_type)
    common_page_objects.click_button(driver, "//*[@id='btnSubmitFormActs']")
コード例 #3
0
def generate_basic_vfl_activity_summary_report_with_subgroups(driver, workgroup):
    """Object used the select_vfl_summary_report object to open the summary report dialog box, enter a given high level
    workgroup, and don't select the SubGroups checkbox and finally submit the search parameters. NOTE - The given workgroup
    should be sourced from the client variables file"""
    select_vfl_activity_summary_report(driver)
    common_page_objects.send_value(driver, "//*[@id='s2id_autogen2']", workgroup)
    common_page_objects.click_button(driver, "//*[@id='formSettings']/section[2]/div[2]/label/i")
    select_vfl_activity_summary_report_submit(driver)
    time.sleep(30)
コード例 #4
0
def select_vfl_activity_summary_report(driver):
    """selects the VFL Summary Report. NOTE - The existing Report page is most likely due to change in V8
    to incorporate multiple modules. Upon opening the Report form, the object will check mandatory fields."""
    common_page_objects.click_button(
        driver, "//*[@id='widDtReports']/div/div[2]/div[1]/a")
    function_module.wait_for_element_XPATH(driver,
                                           "//*[@id='submit_modalSettings']")
    function_module.field_is_mandatory_xpath(
        driver, "//*[@class='select required-select2']/input")
コード例 #5
0
def vfl_reports_button(driver):
    """Object selects the VFL Reports button. NOTE - In version 8 this might move to Common Objects as generic open
    Reports Module button"""
    common_page_objects.click_button(driver,
                                     "//*[@id='left-panel']/nav/ul/li[3]/a/i")
    function_module.verify_value(
        driver, "//*[@id='content']/div[1]/div[1]/h1", 'Reports', 'VFL',
        'Moving to Reports Module',
        'Asserted that we have successfully moved to the Report section',
        'Failed to access to the Report tab')
コード例 #6
0
def generate_basic_vfl_activity_summary_report_with_subgroups(
        driver, workgroup):
    """Object used the select_vfl_summary_report object to open the summary report dialog box, enter a given high level
    workgroup, and don't select the SubGroups checkbox and finally submit the search parameters. NOTE - The given workgroup
    should be sourced from the client variables file"""
    select_vfl_activity_summary_report(driver)
    common_page_objects.send_value(driver, "//*[@id='s2id_autogen2']",
                                   workgroup)
    common_page_objects.click_button(
        driver, "//*[@id='formSettings']/section[2]/div[2]/label/i")
    select_vfl_activity_summary_report_submit(driver)
    time.sleep(30)
コード例 #7
0
def add_vfl_act(driver, radio, act_type):
    """Add a VFL act. Object expects "radio" int parameter which is converted to a string to complete the xpath
    locator. 1 = Safe & 2 = Unsafe. Second parameter expects a string and is used to select the act type from the
    dropdown. The act type should be sourced from the client variables file"""
    radio_string = str(radio)
    function_module.wait_for_element_XPATH(
        driver,
        "//*[@id='formActs']/div/section[1]/div/label[" + radio_string + "]/i")
    driver.find_element_by_xpath(
        "//*[@id='formActs']/div/section[1]/div/label[" + radio_string +
        "]/i").click()
    Select(driver.find_element_by_xpath(
        "//*[@id='Acts']")).select_by_visible_text(act_type)
    common_page_objects.click_button(driver, "//*[@id='btnSubmitFormActs']")
コード例 #8
0
def delete_multiple_vfl_records(driver):
    """Function first checks whether the Delete Multiple Records button is enabled. If it
    is currently disabled, it will select all vfl records and then delete them. If you don't
    want this function to delete all records on the page, please use the 'select_multiple_vfl_records'
    object in your script before this one."""
    button_disabled = function_module.field_is_read_only_xpath(driver, "//*[@id='removeVfl']")
    button_enabled = function_module.field_is_not_read_only_xpath(driver, "//*[@id='removeVfl']")
    if button_disabled == True:
        print 'Delete All VFL Records Button currently disabled'
        select_all_vfl_records(driver)
        time.sleep(1)
        print 'Selected all VFL records on current page'
        common_page_objects.click_button(driver, "//*[@id='removeVfl']/i")
        common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
        print 'Successfully deleted all existing VFL Records'
    elif button_enabled == True:
        print 'Delete All VFL Records Button already enabled'
        common_page_objects.click_button(driver, "//*[@id='removeVfl']/i")
        common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
        print 'Successfully deleted multiple existing VFL Records'
コード例 #9
0
def delete_multiple_vfl_records(driver):
    """Function first checks whether the Delete Multiple Records button is enabled. If it
    is currently disabled, it will select all vfl records and then delete them. If you don't
    want this function to delete all records on the page, please use the 'select_multiple_vfl_records'
    object in your script before this one."""
    button_disabled = function_module.field_is_read_only_xpath(
        driver, "//*[@id='removeVfl']")
    button_enabled = function_module.field_is_not_read_only_xpath(
        driver, "//*[@id='removeVfl']")
    if button_disabled == True:
        print 'Delete All VFL Records Button currently disabled'
        select_all_vfl_records(driver)
        time.sleep(1)
        print 'Selected all VFL records on current page'
        common_page_objects.click_button(driver, "//*[@id='removeVfl']/i")
        common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
        print 'Successfully deleted all existing VFL Records'
    elif button_enabled == True:
        print 'Delete All VFL Records Button already enabled'
        common_page_objects.click_button(driver, "//*[@id='removeVfl']/i")
        common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
        print 'Successfully deleted multiple existing VFL Records'
コード例 #10
0
def edit_vfl_settings(driver):
    """function selects the first rows edit button in the VFL Settings Dialog box"""
    common_page_objects.click_button(
        driver, "//*[@id='dtSettingsContainer']/tr/td[3]/div/div/a[1]/i")
    print "Editing VFL Settings - First Row"
コード例 #11
0
def submit_vfl_settings(driver):
    """function selects the submit button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver,
                                     "//*[@id='btnSubmitFormSettings']")
コード例 #12
0
def select_all_vfl_records(driver):
    """Select the Select All VFL Records checkbox"""
    common_page_objects.click_button(driver,
                                     "//*[@id='dtVFL']/thead/tr/th[1]/input")
コード例 #13
0
def select_vfl_workgroup_subgroups(driver):
    """function clicks the WorkGroup SubGroups checkbox"""
    common_page_objects.click_button(driver, "//*[@id='dtFilterFormContainerVfl']/form/div/div/div[6]/div/label[3]/i")
コード例 #14
0
def view_latest_vfl_record(driver):
    """Select the View Latest VFL button"""
    common_page_objects.click_button(
        driver, "//*[@id='dtVFL']/tbody/tr[1]/td[8]/div[2]/div/a[1]/i")
コード例 #15
0
def open_vfl_settings(driver):
    """function opens the VFL settings dialog box"""
    common_page_objects.click_button(driver, "//*[@id='content']/div[1]/div[2]/div/a")
    function_module.wait_for_element_XPATH(driver, "//*[@id='Year']")
コード例 #16
0
def clear_filters_alt(driver):
    """function selects the alternative Clear Filters button (inside the Filter Panel next to the
    Apply Filters button)and waits for VFL records to load"""
    expand_filters(driver)
    common_page_objects.click_button(driver, "//*[@id='dtFilterFormContainerVfl']/div/div/div/a[1]")
    wait_for_vfl_records(driver)
コード例 #17
0
def update_edit_vfl_settings(driver):
    """function selects the update button when editing a VFL Settings row,
    in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='btnUpdateFormSettings']")
コード例 #18
0
def cancel_edit_vfl_settings(driver):
    """function selects the cancel button when editing a VFL Settings row,
    in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='btnCancelFormSettings']")
    print "Canceled Editing of VFL Settings - First Row"
コード例 #19
0
def delete_latest_vfl_record(driver):
    """Select the Delete Latest VFL button"""
    common_page_objects.click_button(driver, "//*[@id='dtVFL']/tbody/tr[1]/td[8]/div[2]/div/a[3]/i")
    common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
コード例 #20
0
def delete_vfl_settings(driver):
    """function selects the first rows delete button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='dtSettingsContainer']/tr/td[3]/div/div/a[2]/i")
    common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
コード例 #21
0
def edit_vfl_settings(driver):
    """function selects the first rows edit button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='dtSettingsContainer']/tr/td[3]/div/div/a[1]/i")
    print "Editing VFL Settings - First Row"
コード例 #22
0
def close_vfl_settings(driver):
    """function selects the close button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='cancel_modalSettings']")
コード例 #23
0
def submit_vfl_settings(driver):
    """function selects the submit button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='btnSubmitFormSettings']")
コード例 #24
0
def cancel_edit_vfl_settings(driver):
    """function selects the cancel button when editing a VFL Settings row,
    in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver,
                                     "//*[@id='btnCancelFormSettings']")
    print "Canceled Editing of VFL Settings - First Row"
コード例 #25
0
def select_vfl_workgroup_subgroups(driver):
    """function clicks the WorkGroup SubGroups checkbox"""
    common_page_objects.click_button(
        driver,
        "//*[@id='dtFilterFormContainerVfl']/form/div/div/div[6]/div/label[3]/i"
    )
コード例 #26
0
def clear_selected_first_participant(driver):
    """function selects the X button on the currently selected User in the Participant field"""
    common_page_objects.click_button(
        driver, "//*[@id='s2id_Participants']/ul/li[1]/a")
コード例 #27
0
def select_all_vfl_records(driver):
    """Select the Select All VFL Records checkbox"""
    common_page_objects.click_button(driver, "//*[@id='dtVFL']/thead/tr/th[1]/input")
コード例 #28
0
def view_latest_vfl_record(driver):
    """Select the View Latest VFL button"""
    common_page_objects.click_button(driver, "//*[@id='dtVFL']/tbody/tr[1]/td[8]/div[2]/div/a[1]/i")
コード例 #29
0
def clear_selected_creator(driver):
    """function selects the X button on the currently selected User in the CreatedBy field"""
    common_page_objects.click_button(driver,
                                     "//*[@id='s2id_CreatedBy']/ul/li[1]/a")
コード例 #30
0
def select_vfl_activity_summary_report(driver):
    """selects the VFL Summary Report. NOTE - The existing Report page is most likely due to change in V8
    to incorporate multiple modules. Upon opening the Report form, the object will check mandatory fields."""
    common_page_objects.click_button(driver, "//*[@id='widDtReports']/div/div[2]/div[1]/a")
    function_module.wait_for_element_XPATH(driver, "//*[@id='submit_modalSettings']")
    function_module.field_is_mandatory_xpath(driver, "//*[@class='select required-select2']/input")
コード例 #31
0
def apply_filters(driver):
    """function selects the Apply Filter button and waits for VFL records to load"""
    common_page_objects.click_button(
        driver, "//*[@id='dtFilterFormContainerVfl']/div/div/div/a[2]")
    wait_for_vfl_records(driver)
コード例 #32
0
def select_vfl_activity_summary_report_submit(driver):
    """object selects the submit button on the VFL summary reports dialog box"""
    common_page_objects.click_button(driver, "//*[@id='submit_modalSettings']")
コード例 #33
0
def clear_filters_main(driver):
    """function selects the primary Clear Filters button (Next to the Expand Filters button)
    and waits for VFL records to load"""
    common_page_objects.click_button(
        driver, "//*[@id='dtFilterHeaderContainerVfl']/div/a[2]")
    wait_for_vfl_records(driver)
コード例 #34
0
def apply_filters(driver):
    """function selects the Apply Filter button and waits for VFL records to load"""
    common_page_objects.click_button(driver, "//*[@id='dtFilterFormContainerVfl']/div/div/div/a[2]")
    wait_for_vfl_records(driver)
コード例 #35
0
def delete_latest_vfl_record(driver):
    """Select the Delete Latest VFL button"""
    common_page_objects.click_button(
        driver, "//*[@id='dtVFL']/tbody/tr[1]/td[8]/div[2]/div/a[3]/i")
    common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
コード例 #36
0
def vfl_next_button(driver):
    """function selects the next button on the Details tab"""
    common_page_objects.click_button(driver, "//*[@id='btnNextSubmit']")
コード例 #37
0
def open_vfl_settings(driver):
    """function opens the VFL settings dialog box"""
    common_page_objects.click_button(driver,
                                     "//*[@id='content']/div[1]/div[2]/div/a")
    function_module.wait_for_element_XPATH(driver, "//*[@id='Year']")
コード例 #38
0
def select_vfl_activity_summary_report_submit(driver):
    """object selects the submit button on the VFL summary reports dialog box"""
    common_page_objects.click_button(driver, "//*[@id='submit_modalSettings']")
コード例 #39
0
def close_vfl_settings(driver):
    """function selects the close button in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver, "//*[@id='cancel_modalSettings']")
コード例 #40
0
def clear_selected_first_participant(driver):
    """function selects the X button on the currently selected User in the Participant field"""
    common_page_objects.click_button(driver, "//*[@id='s2id_Participants']/ul/li[1]/a")
コード例 #41
0
def delete_vfl_settings(driver):
    """function selects the first rows delete button in the VFL Settings Dialog box"""
    common_page_objects.click_button(
        driver, "//*[@id='dtSettingsContainer']/tr/td[3]/div/div/a[2]/i")
    common_page_objects.click_button(driver, "//*[@id='bot2-Msg1']")
コード例 #42
0
def vfl_finish_button(driver):
    """function selects the finish button on the Acts tab"""
    common_page_objects.click_button(
        driver,
        "//*[@id='bootstrap-wizard-1']/div[2]/div[3]/div/div/ul/li[2]/a")
    function_module.wait_for_element_CSS(driver, "i.fa.fa-power-off", 60)
コード例 #43
0
def update_edit_vfl_settings(driver):
    """function selects the update button when editing a VFL Settings row,
    in the VFL Settings Dialog box"""
    common_page_objects.click_button(driver,
                                     "//*[@id='btnUpdateFormSettings']")
コード例 #44
0
def clear_selected_creator(driver):
    """function selects the X button on the currently selected User in the CreatedBy field"""
    common_page_objects.click_button(driver, "//*[@id='s2id_CreatedBy']/ul/li[1]/a")
コード例 #45
0
def vfl_finish_button(driver):
    """function selects the finish button on the Acts tab"""
    common_page_objects.click_button(driver, "//*[@id='bootstrap-wizard-1']/div[2]/div[3]/div/div/ul/li[2]/a")
    function_module.wait_for_element_CSS(driver, "i.fa.fa-power-off", 60)
コード例 #46
0
def clear_filters_main(driver):
    """function selects the primary Clear Filters button (Next to the Expand Filters button)
    and waits for VFL records to load"""
    common_page_objects.click_button(driver, "//*[@id='dtFilterHeaderContainerVfl']/div/a[2]")
    wait_for_vfl_records(driver)
コード例 #47
0
def vfl_next_button(driver):
    """function selects the next button on the Details tab"""
    common_page_objects.click_button(driver, "//*[@id='btnNextSubmit']")
コード例 #48
0
def vfl_reports_button(driver):
    """Object selects the VFL Reports button. NOTE - In version 8 this might move to Common Objects as generic open
    Reports Module button"""
    common_page_objects.click_button(driver, "//*[@id='left-panel']/nav/ul/li[3]/a/i")
    function_module.verify_value(driver, "//*[@id='content']/div[1]/div[1]/h1", 'Reports', 'VFL', 'Moving to Reports Module',
    'Asserted that we have successfully moved to the Report section', 'Failed to access to the Report tab')