Exemplo n.º 1
0
 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"]')
Exemplo n.º 2
0
 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"]')
Exemplo n.º 3
0
 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",
     )
Exemplo n.º 4
0
 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')
Exemplo n.º 5
0
 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")
Exemplo n.º 6
0
 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')
Exemplo n.º 7
0
 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))
Exemplo n.º 8
0
 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",
     )
Exemplo n.º 9
0
 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",
     )
Exemplo n.º 10
0
 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),
     )
Exemplo n.º 11
0
 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),
     )
Exemplo n.º 12
0
 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')
Exemplo n.º 13
0
 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))
Exemplo n.º 14
0
 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')
Exemplo n.º 15
0
 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')
Exemplo n.º 16
0
 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"]')
Exemplo n.º 17
0
 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')
Exemplo n.º 18
0
 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")]')
Exemplo n.º 19
0
 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')
Exemplo n.º 20
0
 def delete_org(self, index):
     return SiteElement(By.CSS_SELECTOR,
                        'span.tag:nth-of-type({}) a'.format(index))
Exemplo n.º 21
0
 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))
Exemplo n.º 22
0
 def to_resource(self, title):
     return SiteElement(By.XPATH,
                        "//a[contains(text(), '{}')]".format(title))
Exemplo n.º 23
0
 def title(self, num):
     return SiteElement(
         By.CSS_SELECTOR, "div.container.apps-container "
         "div.row div:nth-of-type({}) h3".format(num))
Exemplo n.º 24
0
 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))
Exemplo n.º 25
0
 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))
Exemplo n.º 26
0
 def __init__(self):
     self.container = \
         SiteElement(*self.apps_container_locator)
Exemplo n.º 27
0
 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)')
Exemplo n.º 28
0
 def __init__(self):
     self.name = SiteElement(By.CSS_SELECTOR, '.group-title')
Exemplo n.º 29
0
 def __init__(self):
     self.create_group = SiteElement(
         By.CSS_SELECTOR, 'a[data-target="#create-group-dialog"]')
Exemplo n.º 30
0
 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')