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


PHP WebDriverBy::partialLinkText方法代码示例

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


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

示例1: testGetByPartialLinkText

 public function testGetByPartialLinkText()
 {
     $this->driver->get($this->getTestPath('index.html'));
     self::assertEquals('Click here', $this->driver->findElement(WebDriverBy::partialLinkText('Click'))->getText());
 }
开发者ID:DGCarramona,项目名称:php-webdriver,代码行数:5,代码来源:BaseTest.php

示例2: testWebDriverWaits

 public function testWebDriverWaits()
 {
     $fakeWd = Stub::make('\\Codeception\\Module\\WebDriver', ['wait' => Stub::exactly(12, function () {
         return new \Codeception\Util\Maybe();
     })]);
     $this->module->webDriver = $fakeWd;
     $this->module->waitForElement(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElement(['id' => 'user']);
     $this->module->waitForElement(['css' => '.user']);
     $this->module->waitForElement('//xpath');
     $this->module->waitForElementVisible(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElementVisible(['id' => 'user']);
     $this->module->waitForElementVisible(['css' => '.user']);
     $this->module->waitForElementVisible('//xpath');
     $this->module->waitForElementNotVisible(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElementNotVisible(['id' => 'user']);
     $this->module->waitForElementNotVisible(['css' => '.user']);
     $this->module->waitForElementNotVisible('//xpath');
 }
开发者ID:augustus-amalejo,项目名称:palittayo,代码行数:19,代码来源:WebDriverTest.php

示例3: tearDownAfterClass

 /**
  * Closes web browser.
  */
 public static function tearDownAfterClass()
 {
     self::$helper->login(self::$login_user, self::$login_pass);
     self::$helper->toRSS();
     self::$helper->deleteAllRooms();
     self::$webDriver->findElement(WebDriverBy::linkText('Privilegien'))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText(self::$classname))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText('Klasse löschen'))->click();
     self::$webDriver->findElement(WebDriverBy::name('cmd[deleteClass]'))->click();
     self::$helper->deleteOneAttributeForBooking();
     self::$helper->deleteUser();
     self::$helper->toRSS();
     self::$helper->deleteUser();
     self::$helper->logout();
     self::$webDriver->quit();
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:19,代码来源:ilRoomSharingAcceptanceBookingFilterTest.php

示例4: dontSeeLink

 public function dontSeeLink($text, $url = null)
 {
     $nodes = $this->webDriver->findElements(\WebDriverBy::partialLinkText($text));
     if (!$url) {
         $this->assertNodesNotContain($text, $nodes, 'a');
         return;
     }
     $nodes = array_filter($nodes, function (\WebDriverElement $e) use($url) {
         return trim($e->getAttribute('href')) == trim($url);
     });
     $this->assertNodesNotContain($text, $nodes, "a[href={$url}]");
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:12,代码来源:WebDriver.php

示例5: waitForPartialLinkText

 /**
  * Wait for anchor element whose visible text partially matches the search value.
  *
  * @param string $partialLinkText
  * @param bool $mustBeVisible Pass true to check if element is also visible. False only checks presence in DOM.
  * @return \RemoteWebElement
  */
 public function waitForPartialLinkText($partialLinkText, $mustBeVisible = false)
 {
     return $this->waitForElement(\WebDriverBy::partialLinkText($partialLinkText), $mustBeVisible);
 }
开发者ID:toms049,项目名称:steward,代码行数:11,代码来源:SyntaxSugarTrait.php

示例6: getPrivilegeClassIDByNamePartial

 public function getPrivilegeClassIDByNamePartial($name)
 {
     $link_taget = $this->webDriver->findElement(WebDriverBy::partialLinkText($name . ' ⇒ User'))->getAttribute('href');
     $link_taget_A_vars = explode("&", $link_taget);
     foreach ($link_taget_A_vars as $var) {
         if (substr($var, 0, 9) === "class_id=") {
             $keyAndValue = explode("=", $var);
             return $keyAndValue[1];
         }
     }
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:11,代码来源:ilRoomSharingAcceptanceSeleniumHelper.php

示例7: tearDownAfterClass

 /**
  * Closes web browser.
  */
 public static function tearDownAfterClass()
 {
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$helper->deleteAllRooms();
     self::$webDriver->findElement(WebDriverBy::linkText('Privilegien'))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText(self::$classname_1))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText('Klasse löschen'))->click();
     self::$webDriver->findElement(WebDriverBy::name('cmd[deleteClass]'))->click();
     self::$webDriver->findElement(WebDriverBy::linkText('Privilegien'))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText(self::$classname_2))->click();
     self::$webDriver->findElement(WebDriverBy::partialLinkText('Klasse löschen'))->click();
     self::$webDriver->findElement(WebDriverBy::name('cmd[deleteClass]'))->click();
     self::$helper->deleteUser();
     self::$helper->toRSS();
     self::$helper->deleteUser();
     self::$helper->logout();
     self::$webDriver->quit();
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:22,代码来源:ilRoomSharingAcceptancePrivilegeTest.php


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