amOnPage("/beforeUrl"); // stepKey: beforeAmOnPageKey } /** * @param AcceptanceTester $I * @throws \Exception */ public function _after(AcceptanceTester $I) { $I->amOnPage("/afterUrl"); // stepKey: afterAmOnPageKey } /** * @param AcceptanceTester $I * @throws \Exception */ public function _failed(AcceptanceTester $I) { $I->saveScreenshot(); // stepKey: saveScreenshot } /** * @Severity(level = SeverityLevel::CRITICAL) * @Features({"TestModule"}) * @Stories({"MQE-305"}) * @Parameter(name = "AcceptanceTester", value="$I") * @param AcceptanceTester $I * @return void * @throws \Exception */ public function BasicFunctionalTest(AcceptanceTester $I) { $I->comment(""); $I->comment(""); $I->comment("seeComment"); $someVarDefinition = $I->grabValueFrom(); // stepKey: someVarDefinition $I->acceptPopup(); // stepKey: acceptPopupKey1 $I->amOnPage("/test/url"); // stepKey: amOnPageKey1 $I->appendField(".functionalTestSelector"); // stepKey: appendFieldKey1 $I->attachFile(".functionalTestSelector", "testFileAttachment"); // stepKey: attachFileKey1 $I->cancelPopup(); // stepKey: cancelPopupKey1 $I->checkOption(".functionalTestSelector"); // stepKey: checkOptionKey1 $I->click(".functionalTestSelector"); // stepKey: clickKey1 $I->clickWithLeftButton(".functionalTestSelector"); // stepKey: clickWithLeftButtonKey1 $I->clickWithRightButton(".functionalTestSelector"); // stepKey: clickWithRightButtonKey1 $I->clickWithLeftButton("#element#element .200", 200, 300); // stepKey: clickWithLeftButtonKeyXY1 $I->clickWithRightButton("#element .4123#element", 200, 300); // stepKey: clickWithRightButtonKeyXY1 $I->closeTab(); // stepKey: closeTabKey1 $I->conditionalClick(".functionalTestSelector", ".functionalDependentTestSelector", true); // stepKey: conditionalClickKey1 $I->comment("[deleteKey1] delete entity 'createKey1'"); PersistedObjectHandler::getInstance()->deleteEntity( "createKey1", "test" ); $I->deleteEntityByUrl("/V1/categories{$grabbedData}"); $I->dontSee("someInput", ".functionalTestSelector"); // stepKey: dontSeeKey1 $I->dontSeeCheckboxIsChecked(".functionalTestSelector"); // stepKey: dontSeeCheckboxIsCheckedKey1 $I->dontSeeCookie("someInput"); // stepKey: dontSeeCookieKey1 $I->dontSeeCurrentUrlEquals("/functionalUrl"); // stepKey: dontSeeCurrentUrlEqualsKey1 $I->dontSeeCurrentUrlMatches("/[0-9]+/"); // stepKey: dontSeeCurrentUrlMatchesKey1 $I->dontSeeElement(".functionalTestSelector"); // stepKey: dontSeeElementKey1 $I->dontSeeElementInDOM(".functionalTestSelector"); // stepKey: dontSeeElementInDOMKey1 $I->dontSeeInCurrentUrl("/functionalUrl"); // stepKey: dontSeeInCurrentUrlKey1 $I->dontSeeInField(".functionalTestSelector"); // stepKey: dontSeeInFieldKey1 $I->dontSeeInPageSource("Cosmo Kramer"); // stepKey: dontSeeInPageSourceKey1 $I->dontSeeInPageSource("
Jerry Seinfeld
"); // stepKey: dontSeeInPageSourceKey2 $I->dontSeeInPageSource("Cosmo Kramer"); // stepKey: dontSeeInPageSourceKey3 $I->dontSeeInPageSource("Jerry Seinfeld
"); // stepKey: dontSeeInPageSourceKey4 $I->dontSeeInPageSource("foo"); // stepKey: dontSeeInPageSourceKey5 $I->dontSeeInPageSource("foo
"); // stepKey: dontSeeInPageSourceKey6 $I->dontSeeInSource("Cosmo Kramer"); // stepKey: dontSeeInSourceKey1 $I->dontSeeInSource("Jerry Seinfeld
"); // stepKey: dontSeeInSourceKey2 $I->dontSeeInTitle("someInput"); // stepKey: dontSeeInTitleKey1 $I->dontSeeLink("someInput", "/functionalUrl"); // stepKey: dontSeeLinkKey1 $I->dontSeeOptionIsSelected(".functionalTestSelector", "someInput"); // stepKey: dontSeeOptionIsSelectedKey1 $I->doubleClick(".functionalTestSelector"); // stepKey: doubleClickKey1 $I->dragAndDrop(".functionalTestSelector", ".functionalTestSelector2"); // stepKey: dragAndDropKey1 $I->dragAndDrop(".functionalTestSelector", ".functionalTestSelector2", 100, 900); // stepKey: dragAndDropKey2 $executeJSKey1 = $I->executeJS("someJSFunction"); // stepKey: executeJSKey1 $I->fillField(".functionalTestSelector", "someInput"); // stepKey: fillFieldKey1 $I->fillField(".functionalTestSelector", "0"); // stepKey: fillFieldKey2 $date = new \DateTime(); $date->setTimestamp(strtotime("Now")); $date->setTimezone(new \DateTimeZone("America/Los_Angeles")); $generateDateKey = $date->format("H:i:s"); $date = new \DateTime(); $date->setTimestamp(strtotime("Now")); $date->setTimezone(new \DateTimeZone("UTC")); $generateDateKey2 = $date->format("H:i:s"); $grabAttributeFromKey1 = $I->grabAttributeFrom(".functionalTestSelector", "someInput"); // stepKey: grabAttributeFromKey1 $grabCookieKey1 = $I->grabCookie("grabCookieInput", ['domain' => 'www.google.com']); // stepKey: grabCookieKey1 $grabFromCurrentUrlKey1 = $I->grabFromCurrentUrl("/grabCurrentUrl"); // stepKey: grabFromCurrentUrlKey1 $grabMultipleKey1 = $I->grabMultiple(".functionalTestSelector"); // stepKey: grabMultipleKey1 $grabTextFromKey1 = $I->grabTextFrom(".functionalTestSelector"); // stepKey: grabTextFromKey1 $grabValueFromKey1 = $I->grabValueFrom(".functionalTestSelector"); // stepKey: grabValueFromKey1 $magentoCli1 = $I->magentoCLI("maintenance:enable", "\"stuffHere\""); // stepKey: magentoCli1 $I->comment($magentoCli1); $I->makeScreenshot("screenShotInput"); // stepKey: makeScreenshotKey1 $I->maximizeWindow(); // stepKey: maximizeWindowKey1 $I->moveBack(); // stepKey: moveBackKey1 $I->moveForward(); // stepKey: moveForwardKey1 $I->moveMouseOver(".functionalTestSelector"); // stepKey: moveMouseOverKey1 $I->openNewTab(); // stepKey: openNewTabKey1 $I->pauseExecution(); // stepKey: pauseExecutionKey1 $I->performOn("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();}, 10); // stepKey: performOnKey1 $I->pressKey("#page", "a"); // stepKey: pressKey1 $I->pressKey("#page", ['ctrl', 'a'],'new'); // stepKey: pressKey2 $I->pressKey("#page", ['shift', '111'],'1','x'); // stepKey: pressKey3 $I->pressKey("#page", ['ctrl', 'a'],\Facebook\WebDriver\WebDriverKeys::DELETE); // stepKey: pressKey4 $I->reloadPage(); // stepKey: reloadPageKey1 $I->resetCookie("cookieInput"); // stepKey: resetCookieKey1 $I->resizeWindow(0, 0); // stepKey: resizeWindowKey1 $I->scrollTo(".functionalTestSelector"); // stepKey: scrollToKey1 $I->see("someInput", ".functionalTestSelector"); // stepKey: seeKey1 $I->seeCheckboxIsChecked(".functionalTestSelector"); // stepKey: seeCheckboxIsCheckedKey1 $I->seeCookie("someInput"); // stepKey: seeCookieKey1 $I->seeCurrentUrlEquals("/functionalUrl"); // stepKey: seeCurrentUrlEqualsKey1 $I->seeCurrentUrlMatches("/[0-9]+/"); // stepKey: seeCurrentUrlMatchesKey1 $I->seeElement(".functionalTestSelector"); // stepKey: seeElementKey1 $I->seeElementInDOM(".functionalTestSelector"); // stepKey: seeElementInDOMKey1 $I->seeInCurrentUrl("/functionalUrl"); // stepKey: seeInCurrentUrlKey1 $I->seeInField(".functionalTestSelector", "someInput"); // stepKey: seeInFieldKey1 $I->seeInPageSource("Home Page"); // stepKey: seeInPageSourceKey1 $I->seeInPageSource("