本文整理汇总了PHP中WebGuy::wait方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::wait方法的具体用法?PHP WebGuy::wait怎么用?PHP WebGuy::wait使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGuy
的用法示例。
在下文中一共展示了WebGuy::wait方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dontSeeVisualChangesAndHideElement
public function dontSeeVisualChangesAndHideElement(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", "#theblock");
$I->wait(1);
// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", array("#theblock"));
}
示例2: seeVisualChangesAfterSizeChanges
/**
* Comparing a div, that change it's size
*/
public function seeVisualChangesAfterSizeChanges(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/notSameSize.php");
$I->seeVisualChanges("getRedDiv", "div");
$I->wait(1);
// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/notSameSize.php");
$I->seeVisualChanges("getRedDiv", "div");
}
示例3: _turingAddTransition
public function _turingAddTransition(WebGuy $I, $addDelta = false, $state = 0)
{
$I->wait(2);
if ($addDelta === false) {
$I->click('.create-child');
$I->waitForText('transition-function');
$I->click('transition-function');
$I->wait(2);
$I->click('.create-child[rel*="--*?1!--*?1!"]', '.generatedForm');
$prefix = '--*?1!';
} else {
$I->click('.create-child[rel*="--*--*?1!"]');
$prefix = '--*';
}
CommonScenarios::waitAndClickInTypeahead($I, 'delta');
$I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?1!"]', 'test-name' . time());
// add input subtree
$I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!"]', '.generatedForm');
CommonScenarios::waitAndClickInTypeahead($I, 'input');
$I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?1!"]');
$I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?1!"]', $state);
$I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?2!"]', '1');
// add output subtree
$I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!"]', '.generatedForm');
CommonScenarios::waitAndClickInTypeahead($I, 'output');
$I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
CommonScenarios::waitAndClickInTypeahead($I, 'state');
$I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?1!"]');
$I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?1!"]', $state + 1);
$I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
CommonScenarios::waitAndClickInTypeahead($I, 'symbol');
$I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?2!"]');
$I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?2!"]', '2');
$I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
CommonScenarios::waitAndClickInTypeahead($I, 'head-move');
$I->waitForElement('.generatedForm select[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?3!"]');
$I->selectOption('.generatedForm select[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?3!"]', 'right');
}
示例4: _createEmptyModule
public function _createEmptyModule(WebGuy $I)
{
$I->canSee('Create empty root element');
$I->wait(2);
$I->click('.typeaheadName');
$I->waitForElement('.typeahead');
$I->click('interfaces');
$I->click('.typeaheadNS');
$I->expectTo('see only one available NS');
$I->seeNumberOfElements('.typeaheadNS + .typeahead a', 1);
$I->click('urn:ietf:params:xml:ns:yang:ietf-interfaces');
$I->click('Create');
$I->waitForText('interfaces');
}
示例5: writeCurrentImageFile
/**
* fail the test. lookup is current image is written
*/
public function writeCurrentImageFile(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
$I->wait(2);
// the test has to be called twice for comparison on the travis server
// expect failing the test
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
try {
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
} catch (ImageDeviationException $exception) {
$currentImagePath = $exception->getCurrentImage();
if (!is_file($exception->getCurrentImage())) {
throw new \PHPUnit_Framework_ExpectationFailedException("The screenshot was not saved successfully.");
}
}
}
示例6: WebGuy
<?php
$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Reset my password');
$I->amOnPage('/');
$I->click(LoginPopUp::$loginPopup);
$I->waitForText('Create account');
$I->click(ForgotPopUp::$passwordLink);
$I->waitForText('Forgot password');
$I->wait(1);
$I->waitForElement(ForgotPopUp::$emailField);
$I->seeElement(ForgotPopUp::$emailField);
$I->seeElement(ForgotPopUp::$resetButton);
$I->fillField(ForgotPopUp::$emailField, $email);
$I->click(ForgotPopUp::$resetButton);
$I->waitForText('Reset password link was sent on your e-mail address');
示例7: WebGuy
<?php
$I = new WebGuy($scenario);
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->seeVisualChanges("SimpleBlock", "#theblock");
// the test has to be called twice for comparison on the travis server
$I->wait(2);
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->seeVisualChanges("SimpleBlock", "#theblock");
示例8: WebGuy
<?php
$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Login to muzza.life');
$I->amOnPage(LoginPopUp::$URL);
$I->click(LoginPopUp::$loginPopup);
$I->waitForText(LoginPopUp::$createAccountLink);
$I->see(LoginPopUp::$createAccountLink);
$I->see(LoginPopUp::$createAccountLink);
$I->seeElement(LoginPopUp::$emailField);
$I->seeElement(LoginPopUp::$passwordField);
$I->seeElement(LoginPopUp::$loginButton);
$I->fillField(LoginPopUp::$emailField, $email);
$I->fillField(LoginPopUp::$passwordField, $pass);
$I->click(LoginPopUp::$loginButton);
$I->waitForText($username);
$I->wait(3);
///