本文整理汇总了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.");
}
示例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();
}