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


PHP Locator::find方法代码示例

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


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

示例1: fileManagementViewEditTemplatesTest

 /**
  * Test the 'File management -> View / edit templates' interface
  *
  * @param \AcceptanceTester $I
  */
 public function fileManagementViewEditTemplatesTest(\AcceptanceTester $I)
 {
     $I->wantTo("Use the 'File management -> View / edit templates' interface as the 'developer' user");
     // Set up the browser
     $I->setCookie($this->tokenNames['authtoken'], $this->cookies[$this->tokenNames['authtoken']]);
     $I->setCookie($this->tokenNames['session'], $this->cookies[$this->tokenNames['session']]);
     $I->amOnPage('/bolt/files/themes');
     // Inspect the landing page
     $dir = 'base-2016';
     $I->see('Create folder', Locator::find('a', ['href' => '#']));
     $I->see($dir, Locator::href("/bolt/files/themes/{$dir}"));
     $I->see("Rename {$dir}", Locator::find('a', ['href' => '#']));
     $I->see("Delete {$dir}", Locator::find('a', ['href' => '#']));
     // Navigate into the theme and check the results
     $I->click("{$dir}/", Locator::href("/bolt/files/themes/{$dir}"));
     $I->see('css/', Locator::href("/bolt/files/themes/{$dir}/css"));
     $I->see('images/', Locator::href("/bolt/files/themes/{$dir}/images"));
     $I->see('js/', Locator::href("/bolt/files/themes/{$dir}/js"));
     $I->see('theme.yml', Locator::href("/bolt/file/edit/themes/{$dir}/theme.yml"));
     $I->see('record.twig', Locator::href("/bolt/file/edit/themes/{$dir}/record.twig"));
     $I->see('index.twig', Locator::href("/bolt/file/edit/themes/{$dir}/index.twig"));
     // Navigate into a subdirectory
     $I->click('css/', Locator::href("/bolt/files/themes/{$dir}/css"));
     $I->see('theme.css', Locator::href("/bolt/file/edit/themes/{$dir}/css/theme.css"));
 }
开发者ID:Boorj,项目名称:bolt,代码行数:30,代码来源:BackendDeveloperCest.php

示例2: updateDatabaseTest

 /**
  * Update the database after creating the Resources Contenttype
  *
  * @param \AcceptanceTester $I
  */
 public function updateDatabaseTest(\AcceptanceTester $I)
 {
     $I->wantTo("update the database and add the new 'Resources' Contenttype");
     // Set up the browser
     $I->setCookie('bolt_authtoken', $this->cookies['bolt_authtoken']);
     $I->setCookie('bolt_session', $this->cookies['bolt_session']);
     $I->amOnPage('/bolt/dbcheck');
     $I->see('The database needs to be updated/repaired');
     $I->see('is not present');
     $I->see('Update the database', Locator::find('button', array('type' => 'submit')));
     $I->click('Update the database', Locator::find('button', array('type' => 'submit')));
     $I->see('Modifications made to the database');
     $I->see('Created table');
     $I->see('Your database is now up to date');
 }
开发者ID:PhillippOhlandt,项目名称:bolt-onepage-example,代码行数:20,代码来源:BackendAdminCest.php

示例3: testFind

 public function testFind()
 {
     $xml = new SimpleXMLElement("<root><a href='#' tabindex='2'>Click Me</a></root>");
     $this->assertNotEmpty($xml->xpath(Locator::find('a', array('href' => '#'))));
     $this->assertNotEmpty($xml->xpath(Locator::find('a', array('href', 'tabindex' => '2'))));
 }
开发者ID:corcre,项目名称:elabftw,代码行数:6,代码来源:LocatorTest.php

示例4: updateDatabaseTest

 /**
  * Update the database after creating the Resources Contenttype
  *
  * @param \AcceptanceTester $I
  */
 public function updateDatabaseTest(\AcceptanceTester $I)
 {
     $I->wantTo("update the database and add the new 'Resources' Contenttype");
     // Set up the browser
     $this->setLoginCookies($I);
     $I->amOnPage('/bolt');
     $I->see('The database needs to be updated/repaired');
     $I->see('Check Database', 'a');
     $I->click('Check Database', 'a');
     // We are now on '/bolt/dbcheck'.
     $I->see('is not present');
     $I->see('Update the database', Locator::find('button', ['type' => 'submit']));
     $I->click('Update the database', Locator::find('button', ['type' => 'submit']));
     $I->see('Modifications made to the database');
     $I->see('Created table');
     $I->see('Your database is now up to date');
 }
开发者ID:robbert-vdh,项目名称:bolt,代码行数:22,代码来源:BackendAdminCest.php


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