Esempio n. 1
0
def open_result(browser, document):
    search_results = locate_element(
        browser,
        document.search_attributes["Results Table Id"],
        "search results",
        document=document)
    result_script = get_direct_link(
        locate_elements_by_tag_name(search_results, result_link_tag_name,
                                    "result link", True, document)[1])
    javascript_script_execution(browser, result_script)
Esempio n. 2
0
def get_document_description_link(result_number, document):
    document_description_link = get_direct_link(
        locate_document_description_link(result_number, document))
    if document.description_link is None:
        set_description_link(document, document_description_link)
    elif type(document.description_link) == str:
        document.description_link = [
            document.description_link, document_description_link
        ]
    elif type(document_description_link) == list:
        document.description_link = [
            *document.description_link, document_description_link
        ]
Esempio n. 3
0
def get_result_link(result, document):
    result_link_element = locate_element_by_tag_name(result, result_link_tag_name, "result link",
                                                     True, document=document)
    return get_direct_link(result_link_element)
Esempio n. 4
0
def access_result_link(document, result):
    result_link_element = locate_element_by_tag_name(result, link_tag,
                                                     "result link", True,
                                                     document)
    return get_direct_link(result_link_element)
Esempio n. 5
0
def access_result_link(abstract, document, result):
    result_link_element = locate_element_by_tag_name(
        result, abstract.county.tags["Link"], "result link", True, document)
    return get_direct_link(result_link_element)
Esempio n. 6
0
def open_document_description(browser, abstract, document, result):
    document_link = get_document_link(abstract, result, document)
    document.description_link = get_direct_link(document_link)
    open_url(browser, document.description_link,
             abstract.county.titles["Document Description"],
             "document description", document)
Esempio n. 7
0
def access_free_download_button(download_content, document):
    free_download_button = locate_free_download_button(download_content,
                                                       document)
    return get_direct_link(free_download_button)
Esempio n. 8
0
def open_download(browser, document):
    download_option = locate_download_option(browser, document)
    download_option_link = get_direct_link(download_option)
    browser.get(download_option_link)