Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 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)
Ejemplo n.º 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")
Ejemplo n.º 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')
Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 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'
Ejemplo n.º 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'
Ejemplo n.º 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"
Ejemplo n.º 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']")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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']")
Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 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"
Ejemplo n.º 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']")
Ejemplo n.º 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']")
Ejemplo n.º 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"
Ejemplo n.º 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']")
Ejemplo n.º 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']")
Ejemplo n.º 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"
Ejemplo n.º 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"
    )
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 36
0
def vfl_next_button(driver):
    """function selects the next button on the Details tab"""
    common_page_objects.click_button(driver, "//*[@id='btnNextSubmit']")
Ejemplo n.º 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']")
Ejemplo n.º 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']")
Ejemplo n.º 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']")
Ejemplo n.º 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")
Ejemplo n.º 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']")
Ejemplo n.º 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)
Ejemplo n.º 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']")
Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 47
0
def vfl_next_button(driver):
    """function selects the next button on the Details tab"""
    common_page_objects.click_button(driver, "//*[@id='btnNextSubmit']")
Ejemplo n.º 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')