当前位置: 首页>>代码示例>>PHP>>正文


PHP WebDriverBy::xPath方法代码示例

本文整理汇总了PHP中WebDriverBy::xPath方法的典型用法代码示例。如果您正苦于以下问题:PHP WebDriverBy::xPath方法的具体用法?PHP WebDriverBy::xPath怎么用?PHP WebDriverBy::xPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebDriverBy的用法示例。


在下文中一共展示了WebDriverBy::xPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGenomicBrowserSNPShowBriefFields

 /**
  * Tests that, SNP 'Show brief fields' filter works.
  *
  * Note: the brief fields option should have been tested in
  * testGenomicBrowserSNPDataSortableBrief
  *
  * @-depends testGenomicBrowserSNPDatatable
  *
  * @return void
  */
 function testGenomicBrowserSNPShowBriefFields()
 {
     $this->markTestIncomplete('Test should be updated for new main genomic browser tab.');
     $expected_headers = array('No.', 'PSC', 'DCCID', 'PSCID', 'Gender', 'Subproject', 'DoB', 'ExternalID', 'Chromosome', 'Strand', 'StartLoc', 'EndLoc', 'Size', 'Gene Symbol', 'Gene Name', 'Platform', 'RsID', 'SNP Name', 'SNP Description', 'External Source', 'Observed Base', 'Reference Base', 'Array Report', 'Markers', 'Validation Method', 'Validated', 'Function Prediction', 'Damaging', 'Genotype Quality', 'Exonic Function');
     $this->safeGet($this->url . "/genomic_browser/?submendu=snp_browser");
     // Apply filter
     $this->webDriver->findElement(WebDriverBy::Name('Show_Brief_Results'))->sendKeys("All fields");
     $button = $this->webDriver->findElement(WebDriverBy::xPath("\n                //input[@name='filter']\n            "));
     $this->clickToLoadNewPage($button);
     // Check column count
     $this->safeGet($this->url . "/genomic_browser/?submenu=snp_browser");
     $headers = $this->webDriver->findElements(WebDriverBy::xPath("\n                //div[@id='lorisworkspace']\n                //table[contains(@class, 'dynamictable')]\n                /thead\n                /tr\n                /th\n            "));
     $this->assertCount(count($expected_headers), $headers, "There should be " . count($expected_headers) . " columns in the table.");
 }
开发者ID:spaiva,项目名称:Loris,代码行数:24,代码来源:genomic_browserTest.php

示例2: testImageCommentsWindowEditable

 /**
  * Link to visit level comments editable with proper permissions
  *
  * @return void
  */
 function testImageCommentsWindowEditable()
 {
     $this->markTestSkipped('React components can not be tested');
     // Setting permissions to view all sites to view all datasets
     $this->setupPermissions(array('imaging_browser_view_allsites', 'imaging_browser_qc'));
     $this->safeGet($this->url . "/imaging_browser/");
     $NativeLink = $this->webDriver->findElement(WebDriverBy::xPath('//*[@id="lorisworkspace"]/div[2]/div/div/table/tbody/tr/td[12]/a'));
     $this->clickToLoadNewPage($NativeLink);
     $ImageQCFeedback = $this->webDriver->findElement(WebDriverBy::cssSelector(".mri-second-row-panel > a:nth-child(1) > " . "span:nth-child(1) > span:nth-child(2)"));
     $handleList = $this->webDriver->getWindowHandles();
     $ImageQCFeedback->click();
     $newHandleList = $this->webDriver->getWindowHandles();
     $diff = array_diff($newHandleList, $handleList);
     $this->assertCount(1, $diff);
     $this->webDriver->switchTo()->window($diff[1]);
     // First clear the field then send the comments/text
     $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->clear();
     $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->sendKeys("Testing comment field within Geometric Intensity");
     $SaveButton = $this->webDriver->findElement(WebDriverBy::Name("fire_away"));
     $SaveButton->click();
     $GeometricDistortionText = $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->getText();
     $this->assertEquals("Testing comment field within Geometric Intensity", $GeometricDistortionText);
     $this->webDriver->switchTo()->window($diff[1])->close();
 }
开发者ID:spaiva,项目名称:Loris,代码行数:29,代码来源:imaging_browserTest.php


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