def generate_summary_report_for_vfl_record(driver):
    """Object first verifies that the list page summary report print button is disabled by default. Then the first
    record is selected and the print is selected. We then switch to the window where the report is displaye and
    capture a screenshot for later review"""
    function_module.field_is_read_only_xpath(driver, "//*[@id='printVfl']")
    driver.find_element_by_xpath("//*[@id='dtVFL']/tbody/tr[1]/td[1]/input").click()
    time.sleep(3)
    driver.find_element_by_xpath("//*[@id='printVfl']").click()
    time.sleep(3)
    driver.switch_to_window(driver.window_handles[-1])
    time.sleep(2)
    driver.get_screenshot_as_file('V:/QA/Automation/Automation_Resources/Output/summary_report.png')
    time.sleep(2)
Beispiel #2
0
def generate_summary_report_for_vfl_record(driver):
    """Object first verifies that the list page summary report print button is disabled by default. Then the first
    record is selected and the print is selected. We then switch to the window where the report is displaye and
    capture a screenshot for later review"""
    function_module.field_is_read_only_xpath(driver, "//*[@id='printVfl']")
    driver.find_element_by_xpath(
        "//*[@id='dtVFL']/tbody/tr[1]/td[1]/input").click()
    time.sleep(3)
    driver.find_element_by_xpath("//*[@id='printVfl']").click()
    time.sleep(3)
    driver.switch_to_window(driver.window_handles[-1])
    time.sleep(2)
    driver.get_screenshot_as_file(
        'V:/QA/Automation/Automation_Resources/Output/summary_report.png')
    time.sleep(2)
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'
Beispiel #4
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'