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


PHP WebDriverBy::XPath方法代码示例

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


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

示例1: testHelpEditorPermission

 /**
  * Tests that help editor loads with the permission
  *
  * @return void
  */
 function testHelpEditorPermission()
 {
     $this->setupPermissions(array("context_help"));
     $this->safeGet($this->url . "/help_editor/");
     $bodyText = $this->safeFindElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/table/tbody/tr/td[1]"))->getText();
     $this->assertContains("List of Topics", $bodyText);
     $this->resetPermissions();
 }
开发者ID:spaiva,项目名称:Loris,代码行数:13,代码来源:help_editorTest.php

示例2: testSearchUnresolvedConflicts

 /**
  * Tests research function in unresolved conflicts
  * author: Wang Shen
  *
  * @return void
  */
 function testSearchUnresolvedConflicts()
 {
     $this->safeGet($this->url . "/conflict_resolver/");
     $keywordElement = $this->webDriver->findElement(WebDriverBy::Name("Question"));
     $keywordElement->sendkeys('TestTestTest');
     //click show data button
     $this->webDriver->findElement(WebDriverBy::ID("testShowData1"))->click();
     $bodyText = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='conflict_resolver']/div/div/div/" . "table/tbody/tr[1]/td[6]"))->getText();
     $this->assertContains("TestTestTest", $bodyText);
 }
开发者ID:spaiva,项目名称:Loris,代码行数:16,代码来源:conflict_resolverTest.php

示例3: testGeneralDescriptionTabLoads

 public function testGeneralDescriptionTabLoads()
 {
     $this->webDriver->get($this->url . '?test_name=statistics&subtest=stats_general&dynamictabs=dynamictabs');
     $header = $this->webDriver->findElement(WebDriverBy::XPath("//div[@id = 'page']/h2"));
     $this->assertContains("Welcome to the statistics page", $header->getText());
 }
开发者ID:frankbiospective,项目名称:Loris,代码行数:6,代码来源:Statistics_Test.php

示例4: testDashboardRecruitmentView

 /**
  * To test that, when loading the Dashboard, click the Views button of
  * Recruitment, the items "View overall recruitment" and "View site breakdown"
  * appear
  * author : Wang Shen
  *
  * @return void
  */
 public function testDashboardRecruitmentView()
 {
     $this->safeGet($this->url . '/dashboard/');
     $views = $this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='lorisworkspace']/div/di" . "v[1]/div[2]/div[1]/div/div/button"));
     $views->click();
     $assertText1 = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/div/div[1]" . "/div[2]/div[1]/div/div/ul/li[1]/a"))->getText();
     $assertText2 = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/div/div[1]" . "/div[2]/div[1]/div/div/ul/li[2]/a"))->getText();
     $this->assertContains("View overall recruitment", $assertText1);
     $this->assertContains("View site breakdown", $assertText2);
 }
开发者ID:spaiva,项目名称:Loris,代码行数:18,代码来源:DashboardTest.php


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