12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996 |
- <?php //[STAMP] 83e50ed067f4946726f320105b4f8f52
- namespace _generated;
- // This class was automatically generated by build task
- // You should not change it manually as it will be overwritten on next build
- // @codingStandardsIgnoreFile
- use Helper\Acceptance;
- use Codeception\Module\WebDriver;
- use Codeception\Module\VisualCeption;
- trait AcceptanceTesterActions
- {
- /**
- * @return \Codeception\Scenario
- */
- abstract protected function getScenario();
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Print out latest Selenium Logs in debug mode
- *
- * @param TestInterface $test
- * @see \Codeception\Module\WebDriver::debugWebDriverLogs()
- */
- public function debugWebDriverLogs($test = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('debugWebDriverLogs', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Changes the subdomain for the 'url' configuration parameter.
- * Does not open a page; use `amOnPage` for that.
- *
- * ``` php
- * <?php
- * // If config is: 'http://mysite.com'
- * // or config is: 'http://www.mysite.com'
- * // or config is: 'http://company.mysite.com'
- *
- * $I->amOnSubdomain('user');
- * $I->amOnPage('/');
- * // moves to http://user.mysite.com/
- * ?>
- * ```
- *
- * @param $subdomain
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::amOnSubdomain()
- */
- public function amOnSubdomain($subdomain) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Takes a screenshot of the current window and saves it to `tests/_output/debug`.
- *
- * ``` php
- * <?php
- * $I->amOnPage('/user/edit');
- * $I->makeScreenshot('edit_page');
- * // saved to: tests/_output/debug/edit_page.png
- * $I->makeScreenshot();
- * // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.png
- * ```
- *
- * @param $name
- * @see \Codeception\Module\WebDriver::makeScreenshot()
- */
- public function makeScreenshot($name = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('makeScreenshot', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Resize the current window.
- *
- * ``` php
- * <?php
- * $I->resizeWindow(800, 600);
- *
- * ```
- *
- * @param int $width
- * @param int $height
- * @see \Codeception\Module\WebDriver::resizeWindow()
- */
- public function resizeWindow($width, $height) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('resizeWindow', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a cookie with the given name is set.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * ``` php
- * <?php
- * $I->seeCookie('PHPSESSID');
- * ?>
- * ```
- *
- * @param $cookie
- * @param array $params
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeCookie()
- */
- public function canSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a cookie with the given name is set.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * ``` php
- * <?php
- * $I->seeCookie('PHPSESSID');
- * ?>
- * ```
- *
- * @param $cookie
- * @param array $params
- * @return mixed
- * @see \Codeception\Module\WebDriver::seeCookie()
- */
- public function seeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there isn't a cookie with the given name.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeCookie()
- */
- public function cantSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there isn't a cookie with the given name.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Module\WebDriver::dontSeeCookie()
- */
- public function dontSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets a cookie with the given name and value.
- * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument.
- *
- * ``` php
- * <?php
- * $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
- * ?>
- * ```
- *
- * @param $name
- * @param $val
- * @param array $params
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::setCookie()
- */
- public function setCookie($cookie, $value, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Unsets cookie with the given name.
- * You can set additional cookie params like `domain`, `path` in array passed as last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Module\WebDriver::resetCookie()
- */
- public function resetCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs a cookie value.
- * You can set additional cookie params like `domain`, `path` in array passed as last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Module\WebDriver::grabCookie()
- */
- public function grabCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs current page source code.
- *
- * @throws ModuleException if no page was opened.
- *
- * @return string Current page source code.
- * @see \Codeception\Module\WebDriver::grabPageSource()
- */
- public function grabPageSource() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Open web page at the given absolute URL and sets its hostname as the base host.
- *
- * ``` php
- * <?php
- * $I->amOnUrl('http://codeception.com');
- * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
- * ?>
- * ```
- * @see \Codeception\Module\WebDriver::amOnUrl()
- */
- public function amOnUrl($url) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opens the page for the given relative URI.
- *
- * ``` php
- * <?php
- * // opens front page
- * $I->amOnPage('/');
- * // opens /register page
- * $I->amOnPage('/register');
- * ```
- *
- * @param string $page
- * @see \Codeception\Module\WebDriver::amOnPage()
- */
- public function amOnPage($page) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string (case insensitive).
- *
- * You can specify a specific HTML element (via CSS or XPath) as the second
- * parameter to only search within that element.
- *
- * ``` php
- * <?php
- * $I->see('Logout'); // I can suppose user is logged in
- * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
- * $I->see('Sign Up', '//body/h1'); // with XPath
- * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->see('strong')` will return true for strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will *not* be true for strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param string $selector optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::see()
- */
- public function canSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string (case insensitive).
- *
- * You can specify a specific HTML element (via CSS or XPath) as the second
- * parameter to only search within that element.
- *
- * ``` php
- * <?php
- * $I->see('Logout'); // I can suppose user is logged in
- * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
- * $I->see('Sign Up', '//body/h1'); // with XPath
- * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->see('strong')` will return true for strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will *not* be true for strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param string $selector optional
- * @see \Codeception\Module\WebDriver::see()
- */
- public function see($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page doesn't contain the text specified (case insensitive).
- * Give a locator as the second parameter to match a specific region.
- *
- * ```php
- * <?php
- * $I->dontSee('Login'); // I can suppose user is already logged in
- * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
- * $I->dontSee('Sign Up','//body/h1'); // with XPath
- * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->dontSee('strong')` will fail on strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will ignore strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param string $selector optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSee()
- */
- public function cantSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page doesn't contain the text specified (case insensitive).
- * Give a locator as the second parameter to match a specific region.
- *
- * ```php
- * <?php
- * $I->dontSee('Login'); // I can suppose user is already logged in
- * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
- * $I->dontSee('Sign Up','//body/h1'); // with XPath
- * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->dontSee('strong')` will fail on strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will ignore strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param string $selector optional
- * @see \Codeception\Module\WebDriver::dontSee()
- */
- public function dontSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ``` php
- * <?php
- * $I->seeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInSource()
- */
- public function canSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ``` php
- * <?php
- * $I->seeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * @see \Codeception\Module\WebDriver::seeInSource()
- */
- public function seeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ```php
- * <?php
- * $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInSource()
- */
- public function cantSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ```php
- * <?php
- * $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * @see \Codeception\Module\WebDriver::dontSeeInSource()
- */
- public function dontSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page source contains the given string.
- *
- * ```php
- * <?php
- * $I->seeInPageSource('<link rel="apple-touch-icon"');
- * ```
- *
- * @param $text
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInPageSource()
- */
- public function canSeeInPageSource($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPageSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page source contains the given string.
- *
- * ```php
- * <?php
- * $I->seeInPageSource('<link rel="apple-touch-icon"');
- * ```
- *
- * @param $text
- * @see \Codeception\Module\WebDriver::seeInPageSource()
- */
- public function seeInPageSource($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPageSource', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page source doesn't contain the given string.
- *
- * @param $text
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInPageSource()
- */
- public function cantSeeInPageSource($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInPageSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page source doesn't contain the given string.
- *
- * @param $text
- * @see \Codeception\Module\WebDriver::dontSeeInPageSource()
- */
- public function dontSeeInPageSource($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInPageSource', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Perform a click on a link or a button, given by a locator.
- * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
- * For buttons, the "value" attribute, "name" attribute, and inner text are searched.
- * For links, the link text is searched.
- * For images, the "alt" attribute and inner text of any parent links are searched.
- *
- * The second parameter is a context (CSS or XPath locator) to narrow the search.
- *
- * Note that if the locator matches a button of type `submit`, the form will be submitted.
- *
- * ``` php
- * <?php
- * // simple link
- * $I->click('Logout');
- * // button of form
- * $I->click('Submit');
- * // CSS button
- * $I->click('#form input[type=submit]');
- * // XPath
- * $I->click('//form/*[@type=submit]');
- * // link in context
- * $I->click('Logout', '#nav');
- * // using strict locator
- * $I->click(['link' => 'Login']);
- * ?>
- * ```
- *
- * @param $link
- * @param $context
- * @see \Codeception\Module\WebDriver::click()
- */
- public function click($link, $context = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there's a link with the specified text.
- * Give a full URL as the second parameter to match links with that exact URL.
- *
- * ``` php
- * <?php
- * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
- * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeLink()
- */
- public function canSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there's a link with the specified text.
- * Give a full URL as the second parameter to match links with that exact URL.
- *
- * ``` php
- * <?php
- * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
- * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * @see \Codeception\Module\WebDriver::seeLink()
- */
- public function seeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page doesn't contain a link with the given string.
- * If the second parameter is given, only links with a matching "href" attribute will be checked.
- *
- * ``` php
- * <?php
- * $I->dontSeeLink('Logout'); // I suppose user is not logged in
- * $I->dontSeeLink('Checkout now', '/store/cart.php');
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeLink()
- */
- public function cantSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page doesn't contain a link with the given string.
- * If the second parameter is given, only links with a matching "href" attribute will be checked.
- *
- * ``` php
- * <?php
- * $I->dontSeeLink('Logout'); // I suppose user is not logged in
- * $I->dontSeeLink('Checkout now', '/store/cart.php');
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * @see \Codeception\Module\WebDriver::dontSeeLink()
- */
- public function dontSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current URI contains the given string.
- *
- * ``` php
- * <?php
- * // to match: /home/dashboard
- * $I->seeInCurrentUrl('home');
- * // to match: /users/1
- * $I->seeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInCurrentUrl()
- */
- public function canSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current URI contains the given string.
- *
- * ``` php
- * <?php
- * // to match: /home/dashboard
- * $I->seeInCurrentUrl('home');
- * // to match: /users/1
- * $I->seeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::seeInCurrentUrl()
- */
- public function seeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL is equal to the given string.
- * Unlike `seeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals()
- */
- public function canSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL is equal to the given string.
- * Unlike `seeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals()
- */
- public function seeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL matches the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches()
- */
- public function canSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL matches the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches()
- */
- public function seeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URI doesn't contain the given string.
- *
- * ``` php
- * <?php
- * $I->dontSeeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl()
- */
- public function cantSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URI doesn't contain the given string.
- *
- * ``` php
- * <?php
- * $I->dontSeeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl()
- */
- public function dontSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL doesn't equal the given string.
- * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // current url is not root
- * $I->dontSeeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals()
- */
- public function cantSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL doesn't equal the given string.
- * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // current url is not root
- * $I->dontSeeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals()
- */
- public function dontSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current url doesn't match the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches()
- */
- public function cantSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current url doesn't match the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches()
- */
- public function dontSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Executes the given regular expression against the current URI and returns the first match.
- * If no parameters are provided, the full URI is returned.
- *
- * ``` php
- * <?php
- * $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
- * $uri = $I->grabFromCurrentUrl();
- * ?>
- * ```
- *
- * @param string $uri optional
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::grabFromCurrentUrl()
- */
- public function grabFromCurrentUrl($uri = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the specified checkbox is checked.
- *
- * ``` php
- * <?php
- * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
- * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
- * ?>
- * ```
- *
- * @param $checkbox
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked()
- */
- public function canSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the specified checkbox is checked.
- *
- * ``` php
- * <?php
- * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
- * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
- * ?>
- * ```
- *
- * @param $checkbox
- * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked()
- */
- public function seeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Check that the specified checkbox is unchecked.
- *
- * ``` php
- * <?php
- * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
- * ?>
- * ```
- *
- * @param $checkbox
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked()
- */
- public function cantSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Check that the specified checkbox is unchecked.
- *
- * ``` php
- * <?php
- * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
- * ?>
- * ```
- *
- * @param $checkbox
- * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked()
- */
- public function dontSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value.
- * Fields are matched by label text, the "name" attribute, CSS, or XPath.
- *
- * ``` php
- * <?php
- * $I->seeInField('Body','Type your comment here');
- * $I->seeInField('form textarea[name=body]','Type your comment here');
- * $I->seeInField('form input[type=hidden]','hidden_value');
- * $I->seeInField('#searchform input','Search');
- * $I->seeInField('//form/*[@name=search]','Search');
- * $I->seeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInField()
- */
- public function canSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value.
- * Fields are matched by label text, the "name" attribute, CSS, or XPath.
- *
- * ``` php
- * <?php
- * $I->seeInField('Body','Type your comment here');
- * $I->seeInField('form textarea[name=body]','Type your comment here');
- * $I->seeInField('form input[type=hidden]','hidden_value');
- * $I->seeInField('#searchform input','Search');
- * $I->seeInField('//form/*[@name=search]','Search');
- * $I->seeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Module\WebDriver::seeInField()
- */
- public function seeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that an input field or textarea doesn't contain the given value.
- * For fuzzy locators, the field is matched by label text, CSS and XPath.
- *
- * ``` php
- * <?php
- * $I->dontSeeInField('Body','Type your comment here');
- * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
- * $I->dontSeeInField('form input[type=hidden]','hidden_value');
- * $I->dontSeeInField('#searchform input','Search');
- * $I->dontSeeInField('//form/*[@name=search]','Search');
- * $I->dontSeeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInField()
- */
- public function cantSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that an input field or textarea doesn't contain the given value.
- * For fuzzy locators, the field is matched by label text, CSS and XPath.
- *
- * ``` php
- * <?php
- * $I->dontSeeInField('Body','Type your comment here');
- * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
- * $I->dontSeeInField('form input[type=hidden]','hidden_value');
- * $I->dontSeeInField('#searchform input','Search');
- * $I->dontSeeInField('//form/*[@name=search]','Search');
- * $I->dontSeeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Module\WebDriver::dontSeeInField()
- */
- public function dontSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are set on the form matched with the
- * passed selector.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('form[name=myform]', [
- * 'input1' => 'value',
- * 'input2' => 'other value',
- * ]);
- * ?>
- * ```
- *
- * For multi-select elements, or to check values of multiple elements with the same name, an
- * array may be passed:
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('.form-class', [
- * 'multiselect' => [
- * 'value1',
- * 'value2',
- * ],
- * 'checkbox[]' => [
- * 'a checked value',
- * 'another checked value',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('#form-id', [
- * 'checkbox1' => true, // passes if checked
- * 'checkbox2' => false, // passes if unchecked
- * ]);
- * ?>
- * ```
- *
- * Pair this with submitForm for quick testing magic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('//form[@id=my-form]', $form);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInFormFields()
- */
- public function canSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are set on the form matched with the
- * passed selector.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('form[name=myform]', [
- * 'input1' => 'value',
- * 'input2' => 'other value',
- * ]);
- * ?>
- * ```
- *
- * For multi-select elements, or to check values of multiple elements with the same name, an
- * array may be passed:
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('.form-class', [
- * 'multiselect' => [
- * 'value1',
- * 'value2',
- * ],
- * 'checkbox[]' => [
- * 'a checked value',
- * 'another checked value',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('#form-id', [
- * 'checkbox1' => true, // passes if checked
- * 'checkbox2' => false, // passes if unchecked
- * ]);
- * ?>
- * ```
- *
- * Pair this with submitForm for quick testing magic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('//form[@id=my-form]', $form);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * @see \Codeception\Module\WebDriver::seeInFormFields()
- */
- public function seeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are not set on the form matched with
- * the passed selector.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('form[name=myform]', [
- * 'input1' => 'non-existent value',
- * 'input2' => 'other non-existent value',
- * ]);
- * ?>
- * ```
- *
- * To check that an element hasn't been assigned any one of many values, an array can be passed
- * as the value:
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('.form-class', [
- * 'fieldName' => [
- * 'This value shouldn\'t be set',
- * 'And this value shouldn\'t be set',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('#form-id', [
- * 'checkbox1' => true, // fails if checked
- * 'checkbox2' => false, // fails if unchecked
- * ]);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInFormFields()
- */
- public function cantSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are not set on the form matched with
- * the passed selector.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('form[name=myform]', [
- * 'input1' => 'non-existent value',
- * 'input2' => 'other non-existent value',
- * ]);
- * ?>
- * ```
- *
- * To check that an element hasn't been assigned any one of many values, an array can be passed
- * as the value:
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('.form-class', [
- * 'fieldName' => [
- * 'This value shouldn\'t be set',
- * 'And this value shouldn\'t be set',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('#form-id', [
- * 'checkbox1' => true, // fails if checked
- * 'checkbox2' => false, // fails if unchecked
- * ]);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * @see \Codeception\Module\WebDriver::dontSeeInFormFields()
- */
- public function dontSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Selects an option in a select tag or in radio button group.
- *
- * ``` php
- * <?php
- * $I->selectOption('form select[name=account]', 'Premium');
- * $I->selectOption('form input[name=payment]', 'Monthly');
- * $I->selectOption('//form/select[@name=account]', 'Monthly');
- * ?>
- * ```
- *
- * Provide an array for the second argument to select multiple options:
- *
- * ``` php
- * <?php
- * $I->selectOption('Which OS do you use?', array('Windows','Linux'));
- * ?>
- * ```
- *
- * Or provide an associative array for the second argument to specifically define which selection method should be used:
- *
- * ``` php
- * <?php
- * $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows'
- * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows'
- * ?>
- * ```
- *
- * @param $select
- * @param $option
- * @see \Codeception\Module\WebDriver::selectOption()
- */
- public function selectOption($select, $option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Unselect an option in the given select box.
- *
- * @param $select
- * @param $option
- * @see \Codeception\Module\WebDriver::unselectOption()
- */
- public function unselectOption($select, $option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('unselectOption', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
- *
- * ``` php
- * <?php
- * $I->checkOption('#agree');
- * ?>
- * ```
- *
- * @param $option
- * @see \Codeception\Module\WebDriver::checkOption()
- */
- public function checkOption($option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Unticks a checkbox.
- *
- * ``` php
- * <?php
- * $I->uncheckOption('#notify');
- * ?>
- * ```
- *
- * @param $option
- * @see \Codeception\Module\WebDriver::uncheckOption()
- */
- public function uncheckOption($option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Fills a text field or textarea with the given string.
- *
- * ``` php
- * <?php
- * $I->fillField("//input[@type='text']", "Hello World!");
- * $I->fillField(['name' => 'email'], 'jon@mail.com');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Module\WebDriver::fillField()
- */
- public function fillField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Attaches a file relative to the Codeception `_data` directory to the given file upload field.
- *
- * ``` php
- * <?php
- * // file is stored in 'tests/_data/prices.xls'
- * $I->attachFile('input[@type="file"]', 'prices.xls');
- * ?>
- * ```
- *
- * @param $field
- * @param $filename
- * @see \Codeception\Module\WebDriver::attachFile()
- */
- public function attachFile($field, $filename) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Finds and returns the text contents of the given element.
- * If a fuzzy locator is used, the element is found using CSS, XPath,
- * and by matching the full page source by regular expression.
- *
- * ``` php
- * <?php
- * $heading = $I->grabTextFrom('h1');
- * $heading = $I->grabTextFrom('descendant-or-self::h1');
- * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
- * ?>
- * ```
- *
- * @param $cssOrXPathOrRegex
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::grabTextFrom()
- */
- public function grabTextFrom($cssOrXPathOrRegex) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs the value of the given attribute value from the given element.
- * Fails if element is not found.
- *
- * ``` php
- * <?php
- * $I->grabAttributeFrom('#tooltip', 'title');
- * ?>
- * ```
- *
- *
- * @param $cssOrXpath
- * @param $attribute
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::grabAttributeFrom()
- */
- public function grabAttributeFrom($cssOrXpath, $attribute) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Finds the value for the given form field.
- * If a fuzzy locator is used, the field is found by field name, CSS, and XPath.
- *
- * ``` php
- * <?php
- * $name = $I->grabValueFrom('Name');
- * $name = $I->grabValueFrom('input[name=username]');
- * $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']');
- * $name = $I->grabValueFrom(['name' => 'username']);
- * ?>
- * ```
- *
- * @param $field
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::grabValueFrom()
- */
- public function grabValueFrom($field) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs either the text content, or attribute values, of nodes
- * matched by $cssOrXpath and returns them as an array.
- *
- * ```html
- * <a href="#first">First</a>
- * <a href="#second">Second</a>
- * <a href="#third">Third</a>
- * ```
- *
- * ```php
- * <?php
- * // would return ['First', 'Second', 'Third']
- * $aLinkText = $I->grabMultiple('a');
- *
- * // would return ['#first', '#second', '#third']
- * $aLinks = $I->grabMultiple('a', 'href');
- * ?>
- * ```
- *
- * @param $cssOrXpath
- * @param $attribute
- * @return string[]
- * @see \Codeception\Module\WebDriver::grabMultiple()
- */
- public function grabMultiple($cssOrXpath, $attribute = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page and is visible.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->seeElement('.error');
- * $I->seeElement('//form/input[1]');
- * $I->seeElement('input', ['name' => 'login']);
- * $I->seeElement('input', ['value' => '123456']);
- *
- * // strict locator in first arg, attributes in second
- * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @return
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeElement()
- */
- public function canSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page and is visible.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->seeElement('.error');
- * $I->seeElement('//form/input[1]');
- * $I->seeElement('input', ['name' => 'login']);
- * $I->seeElement('input', ['value' => '123456']);
- *
- * // strict locator in first arg, attributes in second
- * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @return
- * @see \Codeception\Module\WebDriver::seeElement()
- */
- public function seeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element is invisible or not present on the page.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->dontSeeElement('.error');
- * $I->dontSeeElement('//form/input[1]');
- * $I->dontSeeElement('input', ['name' => 'login']);
- * $I->dontSeeElement('input', ['value' => '123456']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeElement()
- */
- public function cantSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element is invisible or not present on the page.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->dontSeeElement('.error');
- * $I->dontSeeElement('//form/input[1]');
- * $I->dontSeeElement('input', ['name' => 'login']);
- * $I->dontSeeElement('input', ['value' => '123456']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @see \Codeception\Module\WebDriver::dontSeeElement()
- */
- public function dontSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page, even it is invisible.
- *
- * ``` php
- * <?php
- * $I->seeElementInDOM('//form/input[type=hidden]');
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeElementInDOM()
- */
- public function canSeeElementInDOM($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElementInDOM', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page, even it is invisible.
- *
- * ``` php
- * <?php
- * $I->seeElementInDOM('//form/input[type=hidden]');
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @see \Codeception\Module\WebDriver::seeElementInDOM()
- */
- public function seeElementInDOM($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElementInDOM', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opposite of `seeElementInDOM`.
- *
- * @param $selector
- * @param array $attributes
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeElementInDOM()
- */
- public function cantSeeElementInDOM($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElementInDOM', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opposite of `seeElementInDOM`.
- *
- * @param $selector
- * @param array $attributes
- * @see \Codeception\Module\WebDriver::dontSeeElementInDOM()
- */
- public function dontSeeElementInDOM($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElementInDOM', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there are a certain number of elements matched by the given locator on the page.
- *
- * ``` php
- * <?php
- * $I->seeNumberOfElements('tr', 10);
- * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements
- * ?>
- * ```
- * @param $selector
- * @param mixed $expected int or int[]
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeNumberOfElements()
- */
- public function canSeeNumberOfElements($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there are a certain number of elements matched by the given locator on the page.
- *
- * ``` php
- * <?php
- * $I->seeNumberOfElements('tr', 10);
- * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements
- * ?>
- * ```
- * @param $selector
- * @param mixed $expected int or int[]
- * @see \Codeception\Module\WebDriver::seeNumberOfElements()
- */
- public function seeNumberOfElements($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- *
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM()
- */
- public function canSeeNumberOfElementsInDOM($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElementsInDOM', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- *
- * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM()
- */
- public function seeNumberOfElementsInDOM($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElementsInDOM', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is selected.
- *
- * ``` php
- * <?php
- * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeOptionIsSelected()
- */
- public function canSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is selected.
- *
- * ``` php
- * <?php
- * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::seeOptionIsSelected()
- */
- public function seeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is not selected.
- *
- * ``` php
- * <?php
- * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected()
- */
- public function cantSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is not selected.
- *
- * ``` php
- * <?php
- * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected()
- */
- public function dontSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title contains the given string.
- *
- * ``` php
- * <?php
- * $I->seeInTitle('Blog - Post #1');
- * ?>
- * ```
- *
- * @param $title
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInTitle()
- */
- public function canSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title contains the given string.
- *
- * ``` php
- * <?php
- * $I->seeInTitle('Blog - Post #1');
- * ?>
- * ```
- *
- * @param $title
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::seeInTitle()
- */
- public function seeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title does not contain the given string.
- *
- * @param $title
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::dontSeeInTitle()
- */
- public function cantSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title does not contain the given string.
- *
- * @param $title
- *
- * @return mixed
- * @see \Codeception\Module\WebDriver::dontSeeInTitle()
- */
- public function dontSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Accepts the active JavaScript native popup window, as created by `window.alert`|`window.confirm`|`window.prompt`.
- * Don't confuse popups with modal windows,
- * as created by [various libraries](http://jster.net/category/windows-modals-popups).
- * @see \Codeception\Module\WebDriver::acceptPopup()
- */
- public function acceptPopup() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('acceptPopup', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Dismisses the active JavaScript popup, as created by `window.alert`, `window.confirm`, or `window.prompt`.
- * @see \Codeception\Module\WebDriver::cancelPopup()
- */
- public function cancelPopup() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('cancelPopup', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the active JavaScript popup,
- * as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string.
- *
- * @param $text
- *
- * @throws \Codeception\Exception\ModuleException
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\WebDriver::seeInPopup()
- */
- public function canSeeInPopup($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPopup', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the active JavaScript popup,
- * as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string.
- *
- * @param $text
- *
- * @throws \Codeception\Exception\ModuleException
- * @see \Codeception\Module\WebDriver::seeInPopup()
- */
- public function seeInPopup($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPopup', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Enters text into a native JavaScript prompt popup, as created by `window.prompt`.
- *
- * @param $keys
- *
- * @throws \Codeception\Exception\ModuleException
- * @see \Codeception\Module\WebDriver::typeInPopup()
- */
- public function typeInPopup($keys) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('typeInPopup', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Reloads the current page.
- * @see \Codeception\Module\WebDriver::reloadPage()
- */
- public function reloadPage() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('reloadPage', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Moves back in history.
- * @see \Codeception\Module\WebDriver::moveBack()
- */
- public function moveBack() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Moves forward in history.
- * @see \Codeception\Module\WebDriver::moveForward()
- */
- public function moveForward() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('moveForward', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Submits the given form on the page, optionally with the given form
- * values. Give the form fields values as an array. Note that hidden fields
- * can't be accessed.
- *
- * Skipped fields will be filled by their values from the page.
- * You don't need to click the 'Submit' button afterwards.
- * This command itself triggers the request to form's action.
- *
- * You can optionally specify what button's value to include
- * in the request with the last parameter as an alternative to
- * explicitly setting its value in the second parameter, as
- * button values are not otherwise included in the request.
- *
- * Examples:
- *
- * ``` php
- * <?php
- * $I->submitForm('#login', [
- * 'login' => 'davert',
- * 'password' => '123456'
- * ]);
- * // or
- * $I->submitForm('#login', [
- * 'login' => 'davert',
- * 'password' => '123456'
- * ], 'submitButtonName');
- *
- * ```
- *
- * For example, given this sample "Sign Up" form:
- *
- * ``` html
- * <form action="/sign_up">
- * Login:
- * <input type="text" name="user[login]" /><br/>
- * Password:
- * <input type="password" name="user[password]" /><br/>
- * Do you agree to our terms?
- * <input type="checkbox" name="user[agree]" /><br/>
- * Select pricing plan:
- * <select name="plan">
- * <option value="1">Free</option>
- * <option value="2" selected="selected">Paid</option>
- * </select>
- * <input type="submit" name="submitButton" value="Submit" />
- * </form>
- * ```
- *
- * You could write the following to submit it:
- *
- * ``` php
- * <?php
- * $I->submitForm(
- * '#userForm',
- * [
- * 'user[login]' => 'Davert',
- * 'user[password]' => '123456',
- * 'user[agree]' => true
- * ],
- * 'submitButton'
- * );
- * ```
- * Note that "2" will be the submitted value for the "plan" field, as it is
- * the selected option.
- *
- * Also note that this differs from PhpBrowser, in that
- * ```'user' => [ 'login' => 'Davert' ]``` is not supported at the moment.
- * Named array keys *must* be included in the name as above.
- *
- * Pair this with seeInFormFields for quick testing magic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('//form[@id=my-form]', $form);
- * ?>
- * ```
- *
- * Parameter values must be set to arrays for multiple input fields
- * of the same name, or multi-select combo boxes. For checkboxes,
- * either the string value can be used, or boolean values which will
- * be replaced by the checkbox's value in the DOM.
- *
- * ``` php
- * <?php
- * $I->submitForm('#my-form', [
- * 'field1' => 'value',
- * 'checkbox' => [
- * 'value of first checkbox',
- * 'value of second checkbox,
- * ],
- * 'otherCheckboxes' => [
- * true,
- * false,
- * false
- * ],
- * 'multiselect' => [
- * 'first option value',
- * 'second option value'
- * ]
- * ]);
- * ?>
- * ```
- *
- * Mixing string and boolean values for a checkbox's value is not supported
- * and may produce unexpected results.
- *
- * Field names ending in "[]" must be passed without the trailing square
- * bracket characters, and must contain an array for its value. This allows
- * submitting multiple values with the same name, consider:
- *
- * ```php
- * $I->submitForm('#my-form', [
- * 'field[]' => 'value',
- * 'field[]' => 'another value', // 'field[]' is already a defined key
- * ]);
- * ```
- *
- * The solution is to pass an array value:
- *
- * ```php
- * // this way both values are submitted
- * $I->submitForm('#my-form', [
- * 'field' => [
- * 'value',
- * 'another value',
- * ]
- * ]);
- * ```
- *
- * The `$button` parameter can be either a string, an array or an instance
- * of Facebook\WebDriver\WebDriverBy. When it is a string, the
- * button will be found by its "name" attribute. If $button is an
- * array then it will be treated as a strict selector and a WebDriverBy
- * will be used verbatim.
- *
- * For example, given the following HTML:
- *
- * ``` html
- * <input type="submit" name="submitButton" value="Submit" />
- * ```
- *
- * `$button` could be any one of the following:
- * - 'submitButton'
- * - ['name' => 'submitButton']
- * - WebDriverBy::name('submitButton')
- *
- * @param $selector
- * @param $params
- * @param $button
- * @see \Codeception\Module\WebDriver::submitForm()
- */
- public function submitForm($selector, $params, $button = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits up to $timeout seconds for the given element to change.
- * Element "change" is determined by a callback function which is called repeatedly
- * until the return value evaluates to true.
- *
- * ``` php
- * <?php
- * use \Facebook\WebDriver\WebDriverElement
- * $I->waitForElementChange('#menu', function(WebDriverElement $el) {
- * return $el->isDisplayed();
- * }, 100);
- * ?>
- * ```
- *
- * @param $element
- * @param \Closure $callback
- * @param int $timeout seconds
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::waitForElementChange()
- */
- public function waitForElementChange($element, $callback, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementChange', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits up to $timeout seconds for an element to appear on the page.
- * If the element doesn't appear, a timeout exception is thrown.
- *
- * ``` php
- * <?php
- * $I->waitForElement('#agree_button', 30); // secs
- * $I->click('#agree_button');
- * ?>
- * ```
- *
- * @param $element
- * @param int $timeout seconds
- * @throws \Exception
- * @see \Codeception\Module\WebDriver::waitForElement()
- */
- public function waitForElement($element, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits up to $timeout seconds for the given element to be visible on the page.
- * If element doesn't appear, a timeout exception is thrown.
- *
- * ``` php
- * <?php
- * $I->waitForElementVisible('#agree_button', 30); // secs
- * $I->click('#agree_button');
- * ?>
- * ```
- *
- * @param $element
- * @param int $timeout seconds
- * @throws \Exception
- * @see \Codeception\Module\WebDriver::waitForElementVisible()
- */
- public function waitForElementVisible($element, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementVisible', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits up to $timeout seconds for the given element to become invisible.
- * If element stays visible, a timeout exception is thrown.
- *
- * ``` php
- * <?php
- * $I->waitForElementNotVisible('#agree_button', 30); // secs
- * ?>
- * ```
- *
- * @param $element
- * @param int $timeout seconds
- * @throws \Exception
- * @see \Codeception\Module\WebDriver::waitForElementNotVisible()
- */
- public function waitForElementNotVisible($element, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementNotVisible', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits up to $timeout seconds for the given string to appear on the page.
- *
- * Can also be passed a selector to search in, be as specific as possible when using selectors.
- * waitForText() will only watch the first instance of the matching selector / text provided.
- * If the given text doesn't appear, a timeout exception is thrown.
- *
- * ``` php
- * <?php
- * $I->waitForText('foo', 30); // secs
- * $I->waitForText('foo', 30, '.title'); // secs
- * ?>
- * ```
- *
- * @param string $text
- * @param int $timeout seconds
- * @param string $selector optional
- * @throws \Exception
- * @see \Codeception\Module\WebDriver::waitForText()
- */
- public function waitForText($text, $timeout = null, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForText', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Wait for $timeout seconds.
- *
- * @param int|float $timeout secs
- * @throws \Codeception\Exception\TestRuntimeException
- * @see \Codeception\Module\WebDriver::wait()
- */
- public function wait($timeout) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('wait', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Low-level API method.
- * If Codeception commands are not enough, this allows you to use Selenium WebDriver methods directly:
- *
- * ``` php
- * $I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
- * $webdriver->get('http://google.com');
- * });
- * ```
- *
- * This runs in the context of the
- * [RemoteWebDriver class](https://github.com/facebook/php-webdriver/blob/master/lib/remote/RemoteWebDriver.php).
- * Try not to use this command on a regular basis.
- * If Codeception lacks a feature you need, please implement it and submit a patch.
- *
- * @param callable $function
- * @see \Codeception\Module\WebDriver::executeInSelenium()
- */
- public function executeInSelenium($function) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInSelenium', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Switch to another window identified by name.
- *
- * The window can only be identified by name. If the $name parameter is blank, the parent window will be used.
- *
- * Example:
- * ``` html
- * <input type="button" value="Open window" onclick="window.open('http://example.com', 'another_window')">
- * ```
- *
- * ``` php
- * <?php
- * $I->click("Open window");
- * # switch to another window
- * $I->switchToWindow("another_window");
- * # switch to parent window
- * $I->switchToWindow();
- * ?>
- * ```
- *
- * If the window has no name, match it by switching to next active tab using `switchToNextTab` method.
- *
- * Or use native Selenium functions to get access to all opened windows:
- *
- * ``` php
- * <?php
- * $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
- * $handles=$webdriver->getWindowHandles();
- * $last_window = end($handles);
- * $webdriver->switchTo()->window($last_window);
- * });
- * ?>
- * ```
- *
- * @param string|null $name
- * @see \Codeception\Module\WebDriver::switchToWindow()
- */
- public function switchToWindow($name = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToWindow', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Switch to another frame on the page.
- *
- * Example:
- * ``` html
- * <iframe name="another_frame" src="http://example.com">
- *
- * ```
- *
- * ``` php
- * <?php
- * # switch to iframe
- * $I->switchToIFrame("another_frame");
- * # switch to parent page
- * $I->switchToIFrame();
- *
- * ```
- *
- * @param string|null $name
- * @see \Codeception\Module\WebDriver::switchToIFrame()
- */
- public function switchToIFrame($name = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIFrame', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Executes JavaScript and waits up to $timeout seconds for it to return true.
- *
- * In this example we will wait up to 60 seconds for all jQuery AJAX requests to finish.
- *
- * ``` php
- * <?php
- * $I->waitForJS("return $.active == 0;", 60);
- * ?>
- * ```
- *
- * @param string $script
- * @param int $timeout seconds
- * @see \Codeception\Module\WebDriver::waitForJS()
- */
- public function waitForJS($script, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForJS', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Executes custom JavaScript.
- *
- * This example uses jQuery to get a value and assigns that value to a PHP variable:
- *
- * ```php
- * <?php
- * $myVar = $I->executeJS('return $("#myField").val()');
- * ?>
- * ```
- *
- * @param $script
- * @return mixed
- * @see \Codeception\Module\WebDriver::executeJS()
- */
- public function executeJS($script) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('executeJS', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Maximizes the current window.
- * @see \Codeception\Module\WebDriver::maximizeWindow()
- */
- public function maximizeWindow() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('maximizeWindow', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Performs a simple mouse drag-and-drop operation.
- *
- * ``` php
- * <?php
- * $I->dragAndDrop('#drag', '#drop');
- * ?>
- * ```
- *
- * @param string $source (CSS ID or XPath)
- * @param string $target (CSS ID or XPath)
- * @see \Codeception\Module\WebDriver::dragAndDrop()
- */
- public function dragAndDrop($source, $target) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dragAndDrop', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Move mouse over the first element matched by the given locator.
- * If the first parameter null then the page is used.
- * If the second and third parameters are given,
- * then the mouse is moved to an offset of the element's top-left corner.
- * Otherwise, the mouse is moved to the center of the element.
- *
- * ``` php
- * <?php
- * $I->moveMouseOver(['css' => '.checkout']);
- * $I->moveMouseOver(null, 20, 50);
- * $I->moveMouseOver(['css' => '.checkout'], 20, 50);
- * ?>
- * ```
- *
- * @param string $cssOrXPath css or xpath of the web element
- * @param int $offsetX
- * @param int $offsetY
- *
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::moveMouseOver()
- */
- public function moveMouseOver($cssOrXPath = null, $offsetX = null, $offsetY = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('moveMouseOver', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Performs click with the left mouse button on an element.
- * If the first parameter `null` then the offset is relative to the actual mouse position.
- * If the second and third parameters are given,
- * then the mouse is moved to an offset of the element's top-left corner.
- * Otherwise, the mouse is moved to the center of the element.
- *
- * ``` php
- * <?php
- * $I->clickWithLeftButton(['css' => '.checkout']);
- * $I->clickWithLeftButton(null, 20, 50);
- * $I->clickWithLeftButton(['css' => '.checkout'], 20, 50);
- * ?>
- * ```
- *
- * @param string $cssOrXPath css or xpath of the web element (body by default).
- * @param int $offsetX
- * @param int $offsetY
- *
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::clickWithLeftButton()
- */
- public function clickWithLeftButton($cssOrXPath = null, $offsetX = null, $offsetY = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('clickWithLeftButton', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Performs contextual click with the right mouse button on an element.
- * If the first parameter `null` then the offset is relative to the actual mouse position.
- * If the second and third parameters are given,
- * then the mouse is moved to an offset of the element's top-left corner.
- * Otherwise, the mouse is moved to the center of the element.
- *
- * ``` php
- * <?php
- * $I->clickWithRightButton(['css' => '.checkout']);
- * $I->clickWithRightButton(null, 20, 50);
- * $I->clickWithRightButton(['css' => '.checkout'], 20, 50);
- * ?>
- * ```
- *
- * @param string $cssOrXPath css or xpath of the web element (body by default).
- * @param int $offsetX
- * @param int $offsetY
- *
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::clickWithRightButton()
- */
- public function clickWithRightButton($cssOrXPath = null, $offsetX = null, $offsetY = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('clickWithRightButton', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Pauses test execution in debug mode.
- * To proceed test press "ENTER" in console.
- *
- * This method is useful while writing tests,
- * since it allows you to inspect the current page in the middle of a test case.
- * @see \Codeception\Module\WebDriver::pauseExecution()
- */
- public function pauseExecution() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('pauseExecution', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Performs a double-click on an element matched by CSS or XPath.
- *
- * @param $cssOrXPath
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::doubleClick()
- */
- public function doubleClick($cssOrXPath) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('doubleClick', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Presses the given key on the given element.
- * To specify a character and modifier (e.g. ctrl, alt, shift, meta), pass an array for $char with
- * the modifier as the first element and the character as the second.
- * For special keys use key constants from WebDriverKeys class.
- *
- * ``` php
- * <?php
- * // <input id="page" value="old" />
- * $I->pressKey('#page','a'); // => olda
- * $I->pressKey('#page',array('ctrl','a'),'new'); //=> new
- * $I->pressKey('#page',array('shift','111'),'1','x'); //=> old!!!1x
- * $I->pressKey('descendant-or-self::*[@id='page']','u'); //=> oldu
- * $I->pressKey('#name', array('ctrl', 'a'), \Facebook\WebDriver\WebDriverKeys::DELETE); //=>''
- * ?>
- * ```
- *
- * @param $element
- * @param $char string|array Can be char or array with modifier. You can provide several chars.
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::pressKey()
- */
- public function pressKey($element, $char) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('pressKey', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Append the given text to the given element.
- * Can also add a selection to a select box.
- *
- * ``` php
- * <?php
- * $I->appendField('#mySelectbox', 'SelectValue');
- * $I->appendField('#myTextField', 'appended');
- * ?>
- * ```
- *
- * @param string $field
- * @param string $value
- * @throws \Codeception\Exception\ElementNotFound
- * @see \Codeception\Module\WebDriver::appendField()
- */
- public function appendField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('appendField', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * @param string $name
- * @see \Codeception\Module\WebDriver::saveSessionSnapshot()
- */
- public function saveSessionSnapshot($name) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('saveSessionSnapshot', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * @param string $name
- * @return bool
- * @see \Codeception\Module\WebDriver::loadSessionSnapshot()
- */
- public function loadSessionSnapshot($name) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('loadSessionSnapshot', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Move to the middle of the given element matched by the given locator.
- * Extra shift, calculated from the top-left corner of the element,
- * can be set by passing $offsetX and $offsetY parameters.
- *
- * ``` php
- * <?php
- * $I->scrollTo(['css' => '.checkout'], 20, 50);
- * ?>
- * ```
- *
- * @param $selector
- * @param int $offsetX
- * @param int $offsetY
- * @see \Codeception\Module\WebDriver::scrollTo()
- */
- public function scrollTo($selector, $offsetX = null, $offsetY = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('scrollTo', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opens a new browser tab (wherever it is possible) and switches to it.
- *
- * ```php
- * <?php
- * $I->openNewTab();
- * ```
- * Tab is opened by using `window.open` javascript in a browser.
- * Please note, that adblock can restrict creating such tabs.
- *
- * Can't be used with PhantomJS
- *
- * @see \Codeception\Module\WebDriver::openNewTab()
- */
- public function openNewTab() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('openNewTab', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Closes current browser tab and switches to previous active tab.
- *
- * ```php
- * <?php
- * $I->closeTab();
- * ```
- *
- * Can't be used with PhantomJS
- * @see \Codeception\Module\WebDriver::closeTab()
- */
- public function closeTab() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('closeTab', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Switches to next browser tab.
- * An offset can be specified.
- *
- * ```php
- * <?php
- * // switch to next tab
- * $I->switchToNextTab();
- * // switch to 2nd next tab
- * $I->switchToNextTab(2);
- * ```
- *
- * Can't be used with PhantomJS
- *
- * @param int $offset 1
- * @see \Codeception\Module\WebDriver::switchToNextTab()
- */
- public function switchToNextTab($offset = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToNextTab', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Switches to previous browser tab.
- * An offset can be specified.
- *
- * ```php
- * <?php
- * // switch to previous tab
- * $I->switchToPreviousTab();
- * // switch to 2nd previous tab
- * $I->switchToPreviousTab(2);
- * ```
- *
- * Can't be used with PhantomJS
- *
- * @param int $offset 1
- * @see \Codeception\Module\WebDriver::switchToPreviousTab()
- */
- public function switchToPreviousTab($offset = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToPreviousTab', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Waits for element and runs a sequence of actions inside its context.
- * Actions can be defined with array, callback, or `Codeception\Util\ActionSequence` instance.
- *
- * Actions as array are recommended for simple to combine "waitForElement" with assertions;
- * `waitForElement($el)` and `see('text', $el)` can be simplified to:
- *
- * ```php
- * <?php
- * $I->performOn($el, ['see' => 'text']);
- * ```
- *
- * List of actions can be pragmatically build using `Codeception\Util\ActionSequence`:
- *
- * ```php
- * <?php
- * $I->performOn('.model', ActionSequence::build()
- * ->see('Warning')
- * ->see('Are you sure you want to delete this?')
- * ->click('Yes')
- * );
- * ```
- *
- * Actions executed from array or ActionSequence will print debug output for actions, and adds an action name to
- * exception on failure.
- *
- * Whenever you need to define more actions a callback can be used. A WebDriver module is passed for argument:
- *
- * ```php
- * <?php
- * $I->performOn('.rememberMe', function (WebDriver $I) {
- * $I->see('Remember me next time');
- * $I->seeElement('#LoginForm_rememberMe');
- * $I->dontSee('Login');
- * });
- * ```
- *
- * In 3rd argument you can set number a seconds to wait for element to appear
- *
- * @param $element
- * @param $actions
- * @param int $timeout
- * @see \Codeception\Module\WebDriver::performOn()
- */
- public function performOn($element, $actions, $timeout = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('performOn', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Compare the reference image with a current screenshot, identified by their indentifier name
- * and their element ID.
- *
- * @param string $identifier Identifies your test object
- * @param string $elementID DOM ID of the element, which should be screenshotted
- * @param string|array $excludeElements Element name or array of Element names, which should not appear in the screenshot
- * @param float $deviation
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\VisualCeption::seeVisualChanges()
- */
- public function canSeeVisualChanges($identifier, $elementID = null, $excludeElements = null, $deviation = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeVisualChanges', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Compare the reference image with a current screenshot, identified by their indentifier name
- * and their element ID.
- *
- * @param string $identifier Identifies your test object
- * @param string $elementID DOM ID of the element, which should be screenshotted
- * @param string|array $excludeElements Element name or array of Element names, which should not appear in the screenshot
- * @param float $deviation
- * @see \Codeception\Module\VisualCeption::seeVisualChanges()
- */
- public function seeVisualChanges($identifier, $elementID = null, $excludeElements = null, $deviation = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeVisualChanges', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Compare the reference image with a current screenshot, identified by their indentifier name
- * and their element ID.
- *
- * @param string $identifier identifies your test object
- * @param string $elementID DOM ID of the element, which should be screenshotted
- * @param string|array $excludeElements string of Element name or array of Element names, which should not appear in the screenshot
- * @param float $deviation
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\VisualCeption::dontSeeVisualChanges()
- */
- public function cantSeeVisualChanges($identifier, $elementID = null, $excludeElements = null, $deviation = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeVisualChanges', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Compare the reference image with a current screenshot, identified by their indentifier name
- * and their element ID.
- *
- * @param string $identifier identifies your test object
- * @param string $elementID DOM ID of the element, which should be screenshotted
- * @param string|array $excludeElements string of Element name or array of Element names, which should not appear in the screenshot
- * @param float $deviation
- * @see \Codeception\Module\VisualCeption::dontSeeVisualChanges()
- */
- public function dontSeeVisualChanges($identifier, $elementID = null, $excludeElements = null, $deviation = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeVisualChanges', func_get_args()));
- }
- }
|