本文整理汇总了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');
}
示例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');
}
示例3: testTabIndex
public function testTabIndex()
{
$xml = new SimpleXMLElement("<root><a href='#' tabindex='2'>Click Me</a></root>");
$this->assertNotEmpty($xml->xpath(Locator::tabIndex(2)));
}