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


PHP Locator::tabIndex方法代码示例

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


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

示例1: testStrictLocators

 public function testStrictLocators()
 {
     $this->module->amOnPage('/login');
     $this->module->seeElement(['id' => 'submit-label']);
     $this->module->seeElement(['name' => 'password']);
     $this->module->seeElement(['class' => 'optional']);
     $this->module->seeElement(['css' => 'form.global_form_box']);
     $this->module->seeElement(['xpath' => \Codeception\Util\Locator::tabIndex(4)]);
     $this->module->fillField(['name' => 'password'], '123456');
     $this->module->amOnPage('/form/select');
     $this->module->selectOption(['name' => 'age'], 'child');
     $this->module->amOnPage('/form/checkbox');
     $this->module->checkOption(['name' => 'terms']);
     $this->module->amOnPage('/');
     $this->module->seeElement(['link' => 'Test']);
     $this->module->click(['link' => 'Test']);
     $this->module->seeCurrentUrlEquals('/form/hidden');
 }
开发者ID:augustus-amalejo,项目名称:palittayo,代码行数:18,代码来源:TestsForWeb.php

示例2: testWebDriverByLocators

 public function testWebDriverByLocators()
 {
     $this->module->amOnPage('/login');
     $this->module->seeElement(WebDriverBy::id('submit-label'));
     $this->module->seeElement(WebDriverBy::name('password'));
     $this->module->seeElement(WebDriverBy::className('optional'));
     $this->module->seeElement(WebDriverBy::cssSelector('form.global_form_box'));
     $this->module->seeElement(WebDriverBy::xpath(\Codeception\Util\Locator::tabIndex(4)));
     $this->module->fillField(WebDriverBy::name('password'), '123456');
     $this->module->amOnPage('/form/select');
     $this->module->selectOption(WebDriverBy::name('age'), 'child');
     $this->module->amOnPage('/form/checkbox');
     $this->module->checkOption(WebDriverBy::name('terms'));
     $this->module->amOnPage('/');
     $this->module->seeElement(WebDriverBy::linkText('Test'));
     $this->module->click(WebDriverBy::linkText('Test'));
     $this->module->seeCurrentUrlEquals('/form/hidden');
 }
开发者ID:surjit,项目名称:Codeception,代码行数:18,代码来源:WebDriverTest.php

示例3: testTabIndex

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


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