def __init__(self): self.action = SiteElement(By.ID, "ddActionsMM") self.to_workspace = SiteElement(By.ID, "anchorAddSelectionsToWorkspaceMM") self.workspace = SiteElement(By.ID, "tableModal-DataMgr") self.table_count = SiteElement(By.CSS_SELECTOR, 'select[name="tblMapMarker_length"]')
def __init__(self): self.sort_org = SiteElement(By.XPATH, '//thead//th[contains(text(), "Organization")]') self.save = SiteElement(By.ID, 'btnServicesModalSave') self.search = SiteElement(By.ID, 'btnServicesModalSearch') self.table_count = SiteElement(By.CSS_SELECTOR, 'select[name="tblDataServices_length"]')
def __init__(self): self.helping = SiteElement(By.ID, "Embed") self.results = SiteElement(By.ID, "webWidget") self.search = SiteElement(By.CSS_SELECTOR, "input") self.more = SiteElement( By.CSS_SELECTOR, "svg", )
def __init__(self): self.helping = SiteElement(By.ID, 'Embed') self.results = SiteElement(By.ID, 'webWidget') self.search = SiteElement(By.CSS_SELECTOR, 'input.src-component-' 'field-SearchInput-searchInput') self.more = SiteElement(By.CSS_SELECTOR, 'div.src-component-helpCenter-HelpCenterArticle-' 'originalArticleButton')
def __init__(self): self.select_dropdown = SiteElement(By.ID, "dropdownMenu1") self.select_all = SiteElement(By.ID, "anchorAllSelectionsDataMgr") self.select_clear = SiteElement(By.ID, "spanClearSelectionsDM") self.select_delete = SiteElement(By.ID, "spanRemoveSelectionsDM") self.tools = SiteElement(By.ID, "ddHydrodataToolDataMgr") self.to_csv = SiteElement(By.ID, "idDownloadToClient") self.to_viewer = SiteElement(By.CSS_SELECTOR, "#byuApps ul li a") self.to_hydroshare = SiteElement(By.CSS_SELECTOR, "#byuApps ul li:nth-child(2) a") self.to_none = SiteElement(By.ID, "idNone") self.launch_tool = SiteElement(By.ID, "btnLaunchHydrodataToolDataMgr")
def __init__(self): self.start_date = SiteElement(By.ID, 'id_start_date') self.end_date = SiteElement(By.ID, 'id_end_date') self.map_tab = SiteElement(By.CSS_SELECTOR, 'a[href="#map-view"]') self.map_search = SiteElement(By.ID, 'geocoder-address') self.map_submit = SiteElement(By.ID, 'geocoder-submit') self.list_tab = SiteElement(By.CSS_SELECTOR, 'a[href="#list-view"]') self.sort_order = SiteElement(By.ID, 'id_sort_order') self.sort_direction = SiteElement(By.ID, 'id_sort_direction') self.col_headers = SiteElement(By.CSS_SELECTOR, '#items-discovered thead tr')
def cell(self, col, row): """ Return the cell in the discover table, given row and column indicies """ return SiteElement( By.CSS_SELECTOR, '#items-discovered tbody tr:nth-of-type({}) ' 'td:nth-of-type({})'.format(row, col))
def data_service_list_checkbox(self, index): return SiteElement( By.CSS_SELECTOR, "#treeSearchSummaryServices ul li:nth-of-type({})".format(index + 1) + " span.fancytree-node span.fancytree-checkbox", )
def data_prop_list_checkbox(self, index): return SiteElement( By.CSS_SELECTOR, "#treeSearchSummaryControlledVocabularies ul" + " li:nth-of-type({})".format(index + 1) + " span.fancytree-node span.fancytree-checkbox", )
def full_list_expand(self, item_name): return SiteElement( By.XPATH, '//div[@id="keywordTree"]/ul//' 'span[contains(text(), "{}")]/../' 'span[@class="fancytree-expander"]'.format(item_name), )
def select_title(self, service_title): return SiteElement( By.XPATH, '//table[@id="tblDataServices"]/tbody/tr/td[2]/' 'a[contains(text(), "{}")]' "/../../td[2]".format(service_title), )
def __init__(self): self.select_dropdown = SiteElement(By.ID, 'dropdownMenu1') self.select_all = SiteElement(By.ID, 'anchorAllSelectionsDataMgr') self.select_clear = SiteElement(By.ID, 'spanClearSelectionsDM') self.select_delete = SiteElement(By.ID, 'spanRemoveSelectionsDM') self.tools = SiteElement(By.ID, 'ddHydrodataToolDataMgr') self.to_csv = SiteElement(By.ID, 'idDownloadToClient') self.to_viewer = SiteElement(By.CSS_SELECTOR, '#byuApps ul li a') self.to_none = SiteElement(By.ID, 'idNone')
def cell_strong_href(self, col, row): """ Return the cell's bolded hyperlink in the discover table, given row and column indicies. """ return SiteElement( By.CSS_SELECTOR, '#items-discovered tbody tr:nth-of-type({}) ' 'td:nth-of-type({}) strong a'.format(row, col))
def __init__(self): self.action = SiteElement(By.ID, 'ddActionsDSR') self.count = SiteElement(By.CSS_SELECTOR, 'select[name="tblDetailedSearchResults_length"]') self.to_workspace = SiteElement(By.ID, 'anchorAddSelectionsToWorkspaceDSR') self.exports = SiteElement(By.ID, 'tableModal-DownloadMgrSearchSummary') self.workspace = SiteElement(By.ID, 'tableModal-DataMgrSearchSummary') self.close = SiteElement(By.ID, 'closeSearchSummary') self.search = SiteElement(By.CSS_SELECTOR, '#tblDetailedSearchResults_filter input')
def __init__(self): self.to_my_resources = SiteElement(By.ID, 'dropdown-menu-my-resources') self.to_discover = SiteElement(By.ID, 'dropdown-menu-search') self.to_apps = \ SiteElement(By.ID, 'dropdown-menu-https:--www.hydroshare.org-apps-') self.to_help = SiteElement(By.ID, 'dropdown-menu-http:--help.hydroshare.org') self.to_about = SiteElement( By.ID, 'dropdown-menu-https:--help.hydroshare.org' + '-about-hydroshare-') self.to_login = SiteElement(By.CSS_SELECTOR, '#signin-menu a') self.to_collaborate = SiteElement(By.CSS_SELECTOR, '#dropdown-menu-collaborate a') self.profile_image = SiteElement(By.ID, 'profile-menu') self.profile_button = SiteElement( By.CSS_SELECTOR, '.account div.dropdown-footer ' '.btn.btn-primary')
def __init__(self): self.name = SiteElement(By.CSS_SELECTOR, 'input.form-control[name="name"]') self.purpose = SiteElement(By.CSS_SELECTOR, 'textarea.form-control[name="purpose"]') self.about = SiteElement(By.CSS_SELECTOR, 'textarea.form-control[name="description"]') self.public = SiteElement(By.CSS_SELECTOR, 'input[value="public"]') self.discoverable = SiteElement(By.CSS_SELECTOR, 'input[value="discoverable"]') self.private = SiteElement(By.CSS_SELECTOR, 'input[value="private"]') self.submit = SiteElement(By.CSS_SELECTOR, 'button[type="submit"]')
def __init__(self): self.core_root = SiteElement(By.CSS_SELECTOR, '#content div.row') self.core_breadcrumb = SiteElement(By.ID, 'breadcrumb-menu-home') self.footer_terms = SiteElement(By.CSS_SELECTOR, 'footer a[href=\'/terms-of-use\']') self.footer_privacy = SiteElement(By.CSS_SELECTOR, 'footer a[href=\'/privacy\']') self.footer_sitemap = SiteElement(By.CSS_SELECTOR, 'footer a[href=\'/sitemap/\']') self.title = SiteElement(By.CSS_SELECTOR, 'h1.page-title')
def __init__(self): self.helpcenter = SiteElement(By.CSS_SELECTOR, '#liZendeskTab span a') self.licensing = SiteElement(By.CSS_SELECTOR, '#liLicenseTab span a') self.licensing_close = SiteElement(By.CSS_SELECTOR, '#licenseModal button.close') self.license_repo_top = SiteElement(By.CSS_SELECTOR, '#licenseModal ' 'a[href="http://www.github.com/cuahsi"]') self.license_repo_inline = SiteElement(By.XPATH, '//div[@id="licenseModal"]//' 'a[contains(text(), ' '"http://www.github.com/cuahsi")]') self.contact = SiteElement(By.CSS_SELECTOR, '#liContactTab span a') self.contact_close = SiteElement(By.CSS_SELECTOR, '#contactModal button.close') self.contact_help = SiteElement(By.XPATH, '//a[contains(text(), ' '"Need additional help")]')
def __init__(self): self.save = SiteElement(By.ID, "btnServicesModalSave") self.search = SiteElement(By.ID, "btnServicesModalSearch") self.select_all_non_gridded = SiteElement(By.ID, "checkOnlyObservedValues") self.sort_org = SiteElement( By.XPATH, '//thead//th[contains(text(), "Organization")]') self.table_count = SiteElement( By.CSS_SELECTOR, 'select[name="tblDataServices_length"]') self.input_search = SiteElement( By.CSS_SELECTOR, 'div[id="tblDataServices_filter"] label input')
def delete_org(self, index): return SiteElement(By.CSS_SELECTOR, 'span.tag:nth-of-type({}) a'.format(index))
def col_index(self, col_index): """ Return the column header element, given the index """ return SiteElement( By.CSS_SELECTOR, '#items-discovered thead tr ' 'th:nth-of-type({})'.format(col_index))
def to_resource(self, title): return SiteElement(By.XPATH, "//a[contains(text(), '{}')]".format(title))
def title(self, num): return SiteElement( By.CSS_SELECTOR, "div.container.apps-container " "div.row div:nth-of-type({}) h3".format(num))
def resource(self, num): return SiteElement( By.CSS_SELECTOR, "div.container.apps-container div.row " "div:nth-of-type({}) " "p.app-description a".format(num))
def info(self, num): return SiteElement( By.CSS_SELECTOR, "div.container.apps-container div.row " "div:nth-of-type({}) " "a.app-info-toggle".format(num))
def __init__(self): self.container = \ SiteElement(*self.apps_container_locator)
def __init__(self): self.create_new = SiteElement(By.CSS_SELECTOR, '#facets a') self.title = SiteElement(By.ID, 'txtTitle') self.create_resource = SiteElement( By.CSS_SELECTOR, '.btn-create-resource:nth-of-type(1)')
def __init__(self): self.name = SiteElement(By.CSS_SELECTOR, '.group-title')
def __init__(self): self.create_group = SiteElement( By.CSS_SELECTOR, 'a[data-target="#create-group-dialog"]')
def __init__(self): self.edit = SiteElement(By.ID, 'btn-edit-profile') self.add_org = SiteElement(By.CSS_SELECTOR, 'input[placeholder="Organization(s)"]') self.save = SiteElement(By.CSS_SELECTOR, 'button.btn-save-profile:first-of-type')