當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。