• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python iterate.getTextAsList函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中util.iterate.getTextAsList函数的典型用法代码示例。如果您正苦于以下问题:Python getTextAsList函数的具体用法?Python getTextAsList怎么用?Python getTextAsList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getTextAsList函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_hmdc_build

 def test_hmdc_build(self):
     """
     @Status this test has been updated for the new hmdc pages
     checks the human and mouse build numbers on the HMDC query page
     """
     #displays the HMDC qf
     self.driver.get(PUBLIC_URL + "/diseasePortal")
     #find the pulldown and select Genome Location
     selectorbox = self.driver.find_element_by_class_name("queryBuilder")
     pulldown = selectorbox.find_element_by_tag_name("select").find_elements_by_tag_name("option")
     #print [x.text for x in pulldown]
     searchTextItems = iterate.getTextAsList(pulldown)
     #verifies all the items listed in the pulldown are correct and in order
     self.assertEqual(searchTextItems, ['Please select a field', 'Gene Symbol(s) or ID(s)','Gene Name','Phenotype or Disease Name', 'Phenotype or Disease ID(s)', 'Genome Location', 'Gene File Upload'])
     #click the Genome Location option
     pulldown[5].click()
     #self.assertIn("Genome Location", pulldown[3].Text)
     #finds the human and mouse genome build numbers
     buildnumber = self.driver.find_element_by_class_name('radio-group')
     # get the parent element
     mainbuild = buildnumber.find_elements_by_tag_name('label')
     wait.forAjax(self.driver)
     #confirms that GRCh38 is displayed
     #print [x.text for x in mainbuild]
     searchTextItems = iterate.getTextAsList(mainbuild)
     self.assertEqual(searchTextItems, ['Human (GRCh38)', 'Mouse (GRCm38)'])
    
     """
开发者ID:mgijax,项目名称:mgiselenium,代码行数:28,代码来源:test_snp_build_numbers.py


示例2: test_pheno_show_hide

    def test_pheno_show_hide(self):
        """
        @status this test verifies these Alleles with phenotypes ribbon show/hide affected systems properly.
        @bug under construction
        """
        self.driver.find_element_by_name("nomen").clear()
        self.driver.find_element_by_name("nomen").send_keys("Tg(ACTFLPe)9205Dym")
        self.driver.find_element_by_class_name("buttonLabel").click()
        self.driver.find_element_by_partial_link_text("Tg(ACTFLPe)9205Dym").click()
        self.driver.find_element_by_link_text("show").click()
        phenotypesort = self.driver.find_element_by_id("phenotable_id")
        items = phenotypesort.find_elements_by_css_selector(
            ".phenoSummarySystemRow td:first-child, .phenoSummaryTermRow td:first-child"
        )

        # add all li text to a list for "assertIn" test
        searchTreeItems = iterate.getTextAsList(items)

        self.assertEqual(
            [
                "behavior/neurological",
                "tremors",
                "impaired balance",
                "impaired coordination",
                "abnormal gait",
                "short stride length",
                "cardiovascular system",
                "cardiovascular system phenotype",
                "hearing/vestibular/ear",
                "abnormal ear physiology",
                "mortality/aging",
                "perinatal lethality",
                "nervous system",
                "abnormal synaptic vesicle recycling",
                "abnormal excitatory postsynaptic currents",
            ],
            searchTreeItems,
        )
        self.driver.get(config.FEWI_URL + "/allele/")

        self.driver.find_element_by_name("nomen").clear()
        self.driver.find_element_by_name("nomen").send_keys("Tg(ACTFLPe)9205Dym")
        self.driver.find_element_by_class_name("buttonLabel").click()
        self.driver.find_element_by_partial_link_text("Tg(ACTFLPe)9205Dym").click()
        # self.driver.find_element_by_link_text('show').click()
        phenotypesort = self.driver.find_element_by_id("phenotable_id")
        items = phenotypesort.find_elements_by_css_selector(".phenoSummarySystemRow div:first-child")

        # add all li text to a list for "assertIn" test
        searchTreeItems = iterate.getTextAsList(items)
        self.assertEqual(
            [
                "behavior/neurological",
                "cardiovascular system",
                "hearing/vestibular/ear",
                "mortality/aging",
                "nervous system",
            ],
            searchTreeItems,
        )
开发者ID:mgijax,项目名称:mgiselenium,代码行数:60,代码来源:marker_detail.py


示例3: test_assaytype_column_sort

 def test_assaytype_column_sort(self):
     """
     @status: Tests that the assay type column sort works correctly
     Assay Type column:
     * Not applicable is not shown
     * sort order should be type (with not specified last), followed by assay type and gene
     * reverse order should still leave not specified last
     * blot assays are last by default
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("pax6")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-assayType')
     items = assaylist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Immunohistochemistry", "Immunohistochemistry"])
     assayheader = driver.find_element_by_id("imagesdata").find_element_by_css_selector('th.yui-dt-col-assayType')
     #click the gene header column to sort
     assayheader.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-assayType')
     items = assaylist[2].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["RT-PCR"])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:34,代码来源:gxd_image_summary.py


示例4: test_gene_column_sort

 def test_gene_column_sort(self):
     """
     @status: Tests that the Gene column sort works correctly
     Gene column:
     * sort order is gene, then assay type
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("shh")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     
     imagesdata = driver.find_element_by_id("imagesdata")
     genelist = imagesdata.find_elements_by_css_selector('td.yui-dt-col-gene')
     items = genelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Arx", "Olig2", "Shh"])
     geneheader = imagesdata.find_element_by_css_selector('th.yui-dt-col-gene')
     #click the gene header column to sort
     geneheader.click()
     wait.forAjax(driver)
     time.sleep(.5)
     genelist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-gene')
     items = genelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Arx", "Olig2", "Shh"])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:33,代码来源:gxd_image_summary.py


示例5: test_genes_tab_doids

 def test_genes_tab_doids(self):
     '''
     @status this test verifies the correct DO IDs are returned for this query.
     @bug: under construction
     '''
     my_select = self.driver.find_element_by_xpath("//select[starts-with(@id, 'field_0_')]")#identifies the select field and picks the gene symbols option
     for option in my_select.find_elements_by_tag_name("option"):
         if option.text == 'Gene Symbol(s) or ID(s)':
             option.click()
             break
     
     self.driver.find_element_by_name("formly_3_input_input_0").send_keys("Gata1")#identifies the input field and enters gata1
     wait.forAngular(self.driver)
     self.driver.find_element_by_id("searchButton").click()
     wait.forAngular(self.driver)
     #identify the Genes tab and verify the tab's text
     gene_tab = self.driver.find_element_by_css_selector("ul.nav.nav-tabs > li.uib-tab.nav-item.ng-scope.ng-isolate-scope:nth-child(3) > a.nav-link.ng-binding")
     
     self.assertEqual(gene_tab.text, "Diseases (3)", "Diseases tab is not visible!")
     gene_tab.click()
     
     gene_table = Table(self.driver.find_element_by_id("diseaseTable"))
     
     cells = gene_table.get_column_cells("DO ID")
     
     print iterate.getTextAsList(cells)
     #displays each row of gene data
     doid1 = cells[1]
     doid2 = cells[2]
     doid3 = cells[3]
     #asserts that the correct genes in the correct order are returned
     self.assertEqual(doid1.text, 'DOID:14250')
     self.assertEqual(doid2.text, 'DOID:4971')
     self.assertEqual(doid3.text, 'DOID:1588')
开发者ID:mgijax,项目名称:mgiselenium,代码行数:34,代码来源:hmdc_diseasetab.py


示例6: testResultsTable

 def testResultsTable(self):
     """
     An example of getting data from the results table using
         Table class
         
     NOTE: this is only for example purposes. Not a real test
     """
     driver = self.driver
     form = self.form
     
     form.enter_value('jnumid', '121946')
     form.press_tab()
     
     form.click_search()
     
     results_table = driver.find_element_by_id("indexGrid")
     table = Table(results_table)
     
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     # single cell
     cell = table.get_cell("RNA-WM", "10.5")
     print cell.text
     # empty cell
     cell = table.get_cell("prot-sxn", "A")
开发者ID:mgijax,项目名称:mgiselenium,代码行数:28,代码来源:gxdindex_search_test.py


示例7: testMrkWildcardSearch

 def testMrkWildcardSearch(self):
     """
     @Status tests that a wildcard search for a marker works
     
     """
     form = self.form
     
     form.enter_value('marker_symbol', 'unc5%')
     form.enter_value('_priority_key', 'low')
     form.click_search()
     
     marker_symbol = form.get_value('marker_symbol')
     self.assertEqual(marker_symbol, 'Unc5a')
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker','Unc5a', 'Unc5a', 'Unc5b', 'Unc5b', 'Unc5b', 'Unc5c', 'Unc5c', 'Unc5c', 'Unc5d', 'Unc5d', 'Unc5d'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:27,代码来源:gxdindex_search_test.py


示例8: testModifiedBySearch

 def testModifiedBySearch(self):
     """
     @Status tests that searching the Modified by user field gives the correct results
     
     """
     form = self.form
     form.enter_value('_priority_key', 'Medium')
     form.enter_value('_conditionalmutants_key', 'Conditional')
     form.enter_value('is_coded', 'Yes')
     form.enter_value('modifiedby_login', 'ijm')
     form.press_tab()
     form.click_search()#click the search button
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker', 'Acta2', 'Fabp7', 'Hand1', 'Mbp'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:25,代码来源:gxdindex_search_test.py


示例9: testLessThanEqualDateSearch

 def testLessThanEqualDateSearch(self):
     """
     @Status tests that searching by less than created by date gives the correct results
     
     """
     form = self.form
     form.enter_value('_priority_key', 'Medium')
     form.press_tab()
     form.enter_value('_conditionalmutants_key', 'Conditional (minor)')
     form.press_tab()
     form.enter_value('is_coded', 'Yes')
     form.press_tab()
     form.enter_value('creation_date', "<=09/28/2010")
     form.press_tab()
     form.click_search()#click the search button
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker', 'Clec1b', 'Fgf8', 'Lmx1b', 'Lyve1', 'Pdpn', 'Wnt7a'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:28,代码来源:gxdindex_search_test.py


示例10: testNotesWildcardSearch

 def testNotesWildcardSearch(self):
     """
     @Status tests that a wildcard search for a noteworks
     
     """
     form = self.form
     form.enter_value('comments', '%slot%')
     form.press_tab()
     form.enter_value('_priority_key', 'High')
     form.press_tab()
     form.enter_value('_conditionalmutants_key', '4834242')
     form.press_tab()
     form.enter_value('is_coded', 'true')
     form.press_tab()
     form.click_search()
     note = form.get_value('comments')
     self.assertEqual(note, 'Some of the northern data was obtained using slot blots.  Age of embryo at noon of plug day not specified in reference.')
     #finds the citation field
     citation = form.get_value('citation')
     self.assertEqual(citation, 'Chianale J, Biochim Biophys Acta 1995 Dec 27;1264(3):369-76')
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1, the table headers
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1, the marker symbols
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     print symbols
     self.assertEqual(symbols, ['Marker','Abcb1a', 'Sdc1', 'Sptb', 'Sptbn1'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:34,代码来源:gxdindex_search_test.py


示例11: testMultiFieldSearch

 def testMultiFieldSearch(self):
     """
     @Status tests that searching by priority, conditional, and coded fields gives the correct results
     
     """
     form = self.form
     form.enter_value('_priority_key', 'Medium')
     form.press_tab()
     form.enter_value('_conditionalmutants_key', 'Conditional (minor)')
     form.press_tab()
     form.enter_value('is_coded', 'Yes')
     form.press_tab()
     form.click_search()#click the search button
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker', 'Acta2', 'Aqp2', 'Clec1b', 'Emcn', 'Fgf8', 'Lmx1b', 'Lyve1', 'Pdpn', 'Postn', 'Tagln', 'Upk1b', 'Upk3a', 'Upk3b', 'Wnt7a'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:26,代码来源:gxdindex_search_test.py


示例12: testdeleteoneclipboard

 def testdeleteoneclipboard(self):   
     """
     @status tests you can delete one item from the clipboard.
     """
     self.performSearch(term="emb%")
     
     result = self.driver.find_element_by_id("termResultList").find_elements_by_link_text("embryo")
     clear = self.driver.find_element_by_id("clipboardFunctions").find_element_by_id("clipboardClear")
     clear.click()
     wait.forAngular(self.driver)
     
     clipbox = self.driver.find_element_by_id("clipboardInput")
     clipbox.send_keys("4-5")
     clipbox.send_keys(Keys.RETURN)
     wait.forAngular(self.driver)
     
     clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
     items = clipsort.find_elements_by_css_selector("li")
     
     # add all li text to a list for "assertIn" test
     searchTreeItems = iterate.getTextAsList(items)
     
     self.assertEqual(["TS4; embryo", "TS5; embryo"], searchTreeItems)
     items[1].click()
     wait.forAngular(self.driver)
     
     self.driver.find_element_by_xpath("//*[@id='clipboard']/li[2]/img").click()
     wait.forAngular(self.driver)
     
     clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
     items = clipsort.find_elements_by_css_selector("li")
     searchTreeItems = iterate.getTextAsList(items)
     self.assertEqual(["TS4; embryo"], searchTreeItems)
开发者ID:mgijax,项目名称:mgiselenium,代码行数:33,代码来源:emapaclipboardtest.py


示例13: testCitationWildcardSearch

 def testCitationWildcardSearch(self):
     """
     @Status tests that a wildcard search for a citation works
     
     """
     form = self.form
     form.enter_value('citation', '%Blood 1991% ')
     form.click_search()
     marker_symbol = form.get_value('marker_symbol')
     self.assertEqual(marker_symbol, 'Ptpn1')
     #finds the citation field
     citation = form.get_value('citation')
     self.assertEqual(citation, 'Yi T, Blood 1991 Nov 1;78(9):2222-8')
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1, the table headers
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1, the marker symbols
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker','Ptpn1', 'Ptpn12', 'Ptpn6', 'Ptpra', 'Ptprc', 'Ptpre', 'Ptprj'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:26,代码来源:gxdindex_search_test.py


示例14: testSearchIndex

 def testSearchIndex(self):
     """
     @Status tests that an index record(s) can be searched
     """
     driver = self.driver
     form = self.form
     #find the Index grid
     table_element = driver.find_element_by_id("indexGrid")
     table = Table(table_element)
     #puts an X in the Prot-wm by age 7 box
     cell = table.get_cell("prot-wm", "7")
     cell.click()
     #puts an X in the Prot-wm by age 8 box
     cell = table.get_cell("prot-wm", "8")
     cell.click()
     wait.forAngular(driver)
     form.click_search()#click the search button
     #find the search results table
     results_table = driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker','Adgre1', 'Cdh5', 'Cdx4', 'Eng', 'Fgf8', 'Foxa2', 'Gata6', 'Itga2b', 'Kdr', 'Kdr', 'Kdr', 'Kdr', 'Lrp2', 'Nanog', 'Pdgfra', 'Pecam1', 'Pou3f1', 'Ptprc', 'T', 'T', 'Tal1', 'Tek'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:30,代码来源:gxdindex_search_test.py


示例15: testClipboardShortcut

 def testClipboardShortcut(self):   
     """
     @status confirm the shortcut keys(CTRL + ALT + k) resets the clipboard input box
     """
     actions = ActionChains(self.driver)
     #search for the term tail
     self.performSearch(term="tail")
     
     result = self.driver.find_element_by_id("termResultList").find_element_by_css_selector("mark")
     result.click()
     wait.forAngular(self.driver)
     #clear all items in the clipboard
     clear = self.driver.find_element_by_id("clipboardFunctions").find_element_by_id("clipboardClear")
     clear.click()
     #Add 18 into the add to clipboard field
     clipbox = self.driver.find_element_by_id("clipboardInput")
     clipbox.send_keys("18")
     clipbox.send_keys(Keys.RETURN)
     
     clipdata = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
     items = clipdata.find_elements_by_css_selector("li")
     searchTreeItems = iterate.getTextAsList(items)
     #assert that TS18 tail is displayed in the clipboard
     self.assertEqual(["TS18; tail"], searchTreeItems)
     #clear the clipboard using the shortcut keys
     actions.key_down(Keys.CONTROL).key_down(Keys.ALT).send_keys('k').key_up(Keys.CONTROL).key_up(Keys.ALT).perform()
     time.sleep(5)
      
     clipdata = self.driver.find_element_by_id("emapClipBoardContent")
     items = clipdata.find_elements_by_css_selector("li")
     searchTreeItems = iterate.getTextAsList(items)
     #Assert that the clipboard is empty
     self.assertEqual([], searchTreeItems)
开发者ID:mgijax,项目名称:mgiselenium,代码行数:33,代码来源:emapaclipboardtest.py


示例16: testGreaterThanEqualDateSearch

 def testGreaterThanEqualDateSearch(self):
     """
     @Status tests that searching by greater than or equal to created by date gives the correct results
     
     """
     form = self.form
     form.enter_value('_priority_key', 'Medium')
     form.press_tab()
     form.enter_value('_conditionalmutants_key', 'Conditional (minor)')
     form.press_tab()
     form.enter_value('is_coded', 'Yes')
     form.press_tab()
     form.enter_value('creation_date', ">=11/10/2015")
     form.press_tab()
     wait.forAngular(self.driver)
     form.click_search()#click the search button
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker', 'Acta2', 'Aqp2', 'Emcn', 'Postn', 'Tagln', 'Upk1b', 'Upk3a', 'Upk3b'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:29,代码来源:gxdindex_search_test.py


示例17: testBetweenDateSearch

 def testBetweenDateSearch(self):
     """
     @Status tests that searching by inclusive dates gives the correct results
     
     """
     form = self.form
     form.enter_value('_priority_key', 'Medium')
     form.press_tab()
     form.enter_value('_conditionalmutants_key', 'Conditional')
     form.press_tab()
     form.enter_value('is_coded', 'Yes')
     form.press_tab()
     form.enter_value('creation_date', "10/01/2015..12/01/2015")
     form.press_tab()
     wait.forAngular(self.driver)
     form.click_search()#click the search button
     #find the search results table
     results_table = self.driver.find_element_by_id("resultsTable")
     table = Table(results_table)
     #Iterate and print the search results headers
     header_cells = table.get_header_cells()
     print iterate.getTextAsList(header_cells)
     # print row 1
     cells = table.get_row_cells(1)
     print iterate.getTextAsList(cells)
     #print column 1
     symbols_cells = table.get_column_cells('Marker')
     symbols = iterate.getTextAsList(symbols_cells)
     self.assertEqual(symbols, ['Marker', 'Flrt3', 'Ntn1', 'Pecam1', 'Slit1', 'Tlx1'])
开发者ID:mgijax,项目名称:mgiselenium,代码行数:29,代码来源:gxdindex_search_test.py


示例18: testClipboardBasicSort

    def testClipboardBasicSort(self):
        """
        @status tests that a basic sort works by displaying the clip board results in smart alpha order.
        """
        
        self.performSearch(term="emb%")
        
        result = self.driver.find_element_by_id("termResultList").find_elements_by_link_text("embryo")
        clear = self.driver.find_element_by_id("clipboardFunctions").find_element_by_id("clipboardClear")
        clear.click()
        wait.forAngular(self.driver)
        
        clipbox = self.driver.find_element_by_id("clipboardInput")
        clipbox.send_keys("5-7")
        clipbox.send_keys(Keys.RETURN)
        wait.forAngular(self.driver)
        
        clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
        items = clipsort.find_elements_by_css_selector("li")
        # add all li text to a list for "assertIn" test
        searchTreeItems = iterate.getTextAsList(items)

        self.assertEqual(["TS5; embryo","TS6; embryo","TS7; embryo"], searchTreeItems)
        clipbox.clear()
        
        # do a new search for endoderm
        self.performSearch(term="endoderm")
        
        result = self.driver.find_element_by_id("termResultList").find_elements_by_link_text("endoderm")

        clipbox = self.driver.find_element_by_id("clipboardInput")
        clipbox.send_keys("6-8")
        clipbox.send_keys(Keys.RETURN)
        wait.forAngular(self.driver)
        
        clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
        items = clipsort.find_elements_by_css_selector("li")
        
        # add all li text to a list for "assertIn" test
        searchTreeItems = iterate.getTextAsList(items)
        self.assertEqual(["TS5; embryo","TS6; embryo","TS7; embryo","TS6; endoderm","TS7; endoderm","TS8; endoderm"], searchTreeItems)
        sort = self.driver.find_element_by_id("clipboardFunctions").find_element_by_id("clipboardSort")
        sort.click()
        wait.forAngular(self.driver)
        
        clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")
        items = clipsort.find_elements_by_css_selector("li")
        
        # add all li text to a list for "assertIn" test
        searchTreeItems = iterate.getTextAsList(items)
        self.assertEqual(["TS5; embryo","TS6; embryo","TS6; endoderm","TS7; embryo","TS7; endoderm","TS8; endoderm"], searchTreeItems)
开发者ID:mgijax,项目名称:mgiselenium,代码行数:51,代码来源:emapaclipboardtest.py


示例19: testCommaStages

 def testCommaStages(self):    
     """
     @status adding stages to the clipboard separated by commas.
     """
     self.performSearch(term="epithelium")
     
     result = self.driver.find_element_by_id("termResultList").find_element_by_css_selector("mark")
     result.click()
     wait.forAngular(self.driver)
     
     clear = self.driver.find_element_by_id("clipboardFunctions").find_element_by_id("clipboardClear")
     clear.click()
     wait.forAngular(self.driver)
     
     clipbox = self.driver.find_element_by_id("clipboardInput")
     clipbox.send_keys("15,16,17,19")
     clipbox.send_keys(Keys.RETURN) 
     wait.forAngular(self.driver)
     
     clipsort = self.driver.find_element_by_id("emapClipBoardContent").find_element_by_id("clipboard")       
     items = clipsort.find_elements_by_css_selector("li")
     
     # add all li text to a list for "assertIn" test
     searchTreeItems = iterate.getTextAsList(items)
     self.assertEqual(["TS15; epithelium", "TS16; epithelium", "TS17; epithelium", "TS19; epithelium"], searchTreeItems)
开发者ID:mgijax,项目名称:mgiselenium,代码行数:25,代码来源:emapaclipboardtest.py


示例20: testMinimalStageLinks

    def testMinimalStageLinks(self):
        """
        tests that all stage links exist in the term detail section and clicking them function correctly; this is for a case with only a few stages; jlewis
        """
        self.performSearch(term="second polar body")
        
        detailArea = self.driver.find_element_by_id("termDetailContent")
        
        stageItems = detailArea.find_elements_by_class_name("stageSelector")
        # add all link text to a list for "assertIn" test
        stages = iterate.getTextAsList(stageItems)
        
        self.assertEqual(stages, ["All", "1", "2", "3", "4"])

        # click stage 1
        stage1 = detailArea.find_element_by_link_text("1").click()
        wait.forAjax(self.driver)
        
        #verify EMAPS term is loaded for second polar body
        detailItems = self.driver.find_elements_by_css_selector("#termDetailContent dd")
        self.assertEqual(detailItems[2].text,"EMAPA:16034")
        
        
        # verify stage is active
        activeStage = self.driver.find_element_by_css_selector(".stageSelector.active")
        self.assertEqual(activeStage.text,"1")
开发者ID:mgijax,项目名称:mgiselenium,代码行数:26,代码来源:emapadetailtest.py



注:本文中的util.iterate.getTextAsList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python json.dumps函数代码示例发布时间:2022-05-26
下一篇:
Python http.quote_plus函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap