Skip to content

Commit e247f6b

Browse files
committed
auto updated documentation
1 parent 18b7344 commit e247f6b

24 files changed

+477
-320
lines changed

docs/modules/AngularJS.md

Lines changed: 81 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ PhpBrowser and Framework modules return `Symfony\Component\DomCrawler\Crawler` i
8383

8484
Uri of currently opened page.
8585
* `return` string
86-
* `throws` ModuleException
86+
@throws ModuleException
8787

8888

8989
#### _getUrl
9090

9191
*hidden API method, expected to be used from Helper classes*
9292

9393
Returns URL of a host.
94-
* `throws` ModuleConfigException
94+
@throws ModuleConfigException
9595

9696

9797
#### _savePageSource
@@ -206,7 +206,7 @@ $I->appendField('#myTextField', 'appended');
206206

207207
* `param string` $field
208208
* `param string` $value
209-
* `throws` \Codeception\Exception\ElementNotFound
209+
@throws \Codeception\Exception\ElementNotFound
210210

211211

212212
#### attachFile
@@ -217,7 +217,7 @@ Attaches a file relative to the Codeception data directory to the given file upl
217217

218218
<?php
219219
// file is stored in 'tests/_data/prices.xls'
220-
$I->attachFile('input[ * `type="file"]',` 'prices.xls');
220+
$I->attachFile('input[@type="file"]', 'prices.xls');
221221
?>
222222

223223
{% endhighlight %}
@@ -268,7 +268,7 @@ $I->click('Submit');
268268
// CSS button
269269
$I->click('#form input[type=submit]');
270270
// XPath
271-
$I->click('//form/*[ * `type=submit]');`
271+
$I->click('//form/*[@type=submit]');
272272
// link in context
273273
$I->click('Logout', '#nav');
274274
// using strict locator
@@ -281,18 +281,62 @@ $I->click(['link' => 'Login']);
281281
* `param` $context
282282

283283

284+
#### clickWithLeftButton
285+
286+
Performs click with the left mouse button on an element.
287+
If the first parameter `null` then the offset is relative to the actual mouse position.
288+
If the second and third parameters are given,
289+
then the mouse is moved to an offset of the element's top-left corner.
290+
Otherwise, the mouse is moved to the center of the element.
291+
292+
{% highlight php %}
293+
294+
<?php
295+
$I->clickWithLeftButton(['css' => '.checkout']);
296+
$I->clickWithLeftButton(null, 20, 50);
297+
$I->clickWithLeftButton(['css' => '.checkout'], 20, 50);
298+
?>
299+
300+
{% endhighlight %}
301+
302+
* `param string` $cssOrXPath css or xpath of the web element (body by default).
303+
* `param int` $offsetX
304+
* `param int` $offsetY
305+
306+
@throws \Codeception\Exception\ElementNotFound
307+
308+
284309
#### clickWithRightButton
285310

286311
Performs contextual click with the right mouse button on an element.
312+
If the first parameter `null` then the offset is relative to the actual mouse position.
313+
If the second and third parameters are given,
314+
then the mouse is moved to an offset of the element's top-left corner.
315+
Otherwise, the mouse is moved to the center of the element.
287316

288-
* `param` $cssOrXPath
289-
* `throws` \Codeception\Exception\ElementNotFound
317+
{% highlight php %}
318+
319+
<?php
320+
$I->clickWithRightButton(['css' => '.checkout']);
321+
$I->clickWithRightButton(null, 20, 50);
322+
$I->clickWithRightButton(['css' => '.checkout'], 20, 50);
323+
?>
324+
325+
{% endhighlight %}
326+
327+
* `param string` $cssOrXPath css or xpath of the web element (body by default).
328+
* `param int` $offsetX
329+
* `param int` $offsetY
330+
331+
@throws \Codeception\Exception\ElementNotFound
290332

291333

292334
#### debugWebDriverLogs
293335

294336
Print out latest Selenium Logs in debug mode
295337

338+
* `param TestInterface` $test
339+
296340

297341
#### dontSee
298342

@@ -440,7 +484,7 @@ $I->dontSeeInField('Body','Type your comment here');
440484
$I->dontSeeInField('form textarea[name=body]','Type your comment here');
441485
$I->dontSeeInField('form input[type=hidden]','hidden_value');
442486
$I->dontSeeInField('#searchform input','Search');
443-
$I->dontSeeInField('//form/*[ * `name=search]','Search');`
487+
$I->dontSeeInField('//form/*[@name=search]','Search');
444488
$I->dontSeeInField(['name' => 'search'], 'Search');
445489
?>
446490

@@ -569,7 +613,7 @@ $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
569613
Performs a double-click on an element matched by CSS or XPath.
570614

571615
* `param` $cssOrXPath
572-
* `throws` \Codeception\Exception\ElementNotFound
616+
@throws \Codeception\Exception\ElementNotFound
573617

574618

575619
#### dragAndDrop
@@ -633,8 +677,8 @@ Fills a text field or textarea with the given string.
633677
{% highlight php %}
634678

635679
<?php
636-
$I->fillField("//input[ * `type='text']",` "Hello World!");
637-
$I->fillField(['name' => 'email'], 'jon * `mail.com');`
680+
$I->fillField("//input[@type='text']", "Hello World!");
681+
$I->fillField(['name' => 'email'], 'jon@mail.com');
638682
?>
639683

640684
{% endhighlight %}
@@ -757,7 +801,7 @@ If a fuzzy locator is used, the field is found by field name, CSS, and XPath.
757801
<?php
758802
$name = $I->grabValueFrom('Name');
759803
$name = $I->grabValueFrom('input[name=username]');
760-
$name = $I->grabValueFrom('descendant-or-self::form/descendant::input[ * `name` = 'username']');
804+
$name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']');
761805
$name = $I->grabValueFrom(['name' => 'username']);
762806
?>
763807

@@ -808,13 +852,16 @@ Moves forward in history.
808852
#### moveMouseOver
809853

810854
Move mouse over the first element matched by the given locator.
855+
If the first parameter null then the page is used.
811856
If the second and third parameters are given,
812857
then the mouse is moved to an offset of the element's top-left corner.
813858
Otherwise, the mouse is moved to the center of the element.
814859

815860
{% highlight php %}
816861

817862
<?php
863+
$I->moveMouseOver(['css' => '.checkout']);
864+
$I->moveMouseOver(null, 20, 50);
818865
$I->moveMouseOver(['css' => '.checkout'], 20, 50);
819866
?>
820867

@@ -824,7 +871,7 @@ $I->moveMouseOver(['css' => '.checkout'], 20, 50);
824871
* `param int` $offsetX
825872
* `param int` $offsetY
826873

827-
* `throws` \Codeception\Exception\ElementNotFound
874+
@throws \Codeception\Exception\ElementNotFound
828875

829876

830877
#### pauseExecution
@@ -850,15 +897,15 @@ For special keys use key constants from WebDriverKeys class.
850897
$I->pressKey('#page','a'); // => olda
851898
$I->pressKey('#page',array('ctrl','a'),'new'); //=> new
852899
$I->pressKey('#page',array('shift','111'),'1','x'); //=> old!!!1x
853-
$I->pressKey('descendant-or-self::*[ * `id='page']','u');` //=> oldu
900+
$I->pressKey('descendant-or-self::*[@id='page']','u'); //=> oldu
854901
$I->pressKey('#name', array('ctrl', 'a'), \Facebook\WebDriver\WebDriverKeys::DELETE); //=>''
855902
?>
856903

857904
{% endhighlight %}
858905

859906
* `param` $element
860907
* `param` $char string|array Can be char or array with modifier. You can provide several chars.
861-
* `throws` \Codeception\Exception\ElementNotFound
908+
@throws \Codeception\Exception\ElementNotFound
862909

863910

864911
#### reloadPage
@@ -960,7 +1007,7 @@ Checks that the specified checkbox is checked.
9601007
<?php
9611008
$I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
9621009
$I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
963-
$I->seeCheckboxIsChecked('//form/input[ * `type=checkbox` and * `name=agree]');`
1010+
$I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
9641011
?>
9651012

9661013
{% endhighlight %}
@@ -1039,7 +1086,7 @@ $I->seeElement(['css' => 'form input'], ['name' => 'login']);
10391086

10401087
* `param` $selector
10411088
* `param array` $attributes
1042-
* `return`
1089+
@return
10431090

10441091

10451092
#### seeElementInDOM
@@ -1087,7 +1134,7 @@ $I->seeInField('Body','Type your comment here');
10871134
$I->seeInField('form textarea[name=body]','Type your comment here');
10881135
$I->seeInField('form input[type=hidden]','hidden_value');
10891136
$I->seeInField('#searchform input','Search');
1090-
$I->seeInField('//form/*[ * `name=search]','Search');`
1137+
$I->seeInField('//form/*[@name=search]','Search');
10911138
$I->seeInField(['name' => 'search'], 'Search');
10921139
?>
10931140

@@ -1157,9 +1204,9 @@ $form = [
11571204
'checkbox1' => true,
11581205
// ...
11591206
];
1160-
$I->submitForm('//form[ * `id=my-form]',` $form, 'submitButton');
1207+
$I->submitForm('//form[@id=my-form]', $form, 'submitButton');
11611208
// $I->amOnPage('/path/to/form-page') may be needed
1162-
$I->seeInFormFields('//form[ * `id=my-form]',` $form);
1209+
$I->seeInFormFields('//form[@id=my-form]', $form);
11631210
?>
11641211

11651212
{% endhighlight %}
@@ -1287,7 +1334,7 @@ Selects an option in a select tag or in radio button group.
12871334
<?php
12881335
$I->selectOption('form select[name=account]', 'Premium');
12891336
$I->selectOption('form input[name=payment]', 'Monthly');
1290-
$I->selectOption('//form/select[ * `name=account]',` 'Monthly');
1337+
$I->selectOption('//form/select[@name=account]', 'Monthly');
12911338
?>
12921339

12931340
{% endhighlight %}
@@ -1426,9 +1473,9 @@ $form = [
14261473
'checkbox1' => true,
14271474
// ...
14281475
];
1429-
$I->submitForm('//form[ * `id=my-form]',` $form, 'submitButton');
1476+
$I->submitForm('//form[@id=my-form]', $form, 'submitButton');
14301477
// $I->amOnPage('/path/to/form-page') may be needed
1431-
$I->seeInFormFields('//form[ * `id=my-form]',` $form);
1478+
$I->seeInFormFields('//form[@id=my-form]', $form);
14321479
?>
14331480

14341481
{% endhighlight %}
@@ -1606,15 +1653,19 @@ $I->uncheckOption('#notify');
16061653
16071654
16081655
#### unselectOption
1609-
__not documented__
1656+
1657+
Unselect an option in the given select box.
1658+
1659+
* `param` $select
1660+
* `param` $option
16101661
16111662
16121663
#### wait
16131664
16141665
Wait for $timeout seconds.
16151666
16161667
* `param int` $timeout secs
1617-
* `throws` \Codeception\Exception\TestRuntimeException
1668+
@throws \Codeception\Exception\TestRuntimeException
16181669
16191670
16201671
#### waitForElement
@@ -1633,7 +1684,7 @@ $I->click('#agree_button');
16331684
16341685
* `param` $element
16351686
* `param int` $timeout seconds
1636-
* `throws` \Exception
1687+
@throws \Exception
16371688
16381689
16391690
#### waitForElementChange
@@ -1656,7 +1707,7 @@ $I->waitForElementChange('#menu', function(WebDriverElement $el) {
16561707
* `param` $element
16571708
* `param \Closure` $callback
16581709
* `param int` $timeout seconds
1659-
* `throws` \Codeception\Exception\ElementNotFound
1710+
@throws \Codeception\Exception\ElementNotFound
16601711
16611712
16621713
#### waitForElementNotVisible
@@ -1674,7 +1725,7 @@ $I->waitForElementNotVisible('#agree_button', 30); // secs
16741725
16751726
* `param` $element
16761727
* `param int` $timeout seconds
1677-
* `throws` \Exception
1728+
@throws \Exception
16781729
16791730
16801731
#### waitForElementVisible
@@ -1693,7 +1744,7 @@ $I->click('#agree_button');
16931744
16941745
* `param` $element
16951746
* `param int` $timeout seconds
1696-
* `throws` \Exception
1747+
@throws \Exception
16971748
16981749
16991750
#### waitForJS
@@ -1734,6 +1785,6 @@ $I->waitForText('foo', 30, '.title'); // secs
17341785
* `param string` $text
17351786
* `param int` $timeout seconds
17361787
* `param null` $selector
1737-
* `throws` \Exception
1788+
@throws \Exception
17381789
17391790
<p>&nbsp;</p><div class="alert alert-warning">Module reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/tree/2.2/src/Codeception/Module/AngularJS.php">Help us to improve documentation. Edit module reference</a></div>

docs/modules/Apc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Examples:
9090

9191
<?php
9292
// Array
93-
$I->haveInApc('users', ['name' => 'miles', 'email' => 'miles * `davis.com']);`
93+
$I->haveInApc('users', ['name' => 'miles', 'email' => 'miles@davis.com']);
9494

9595
// Object
9696
$I->haveInApc('user', UserRepository::findFirst());

docs/modules/Db.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Provide table name and column values.
145145
{% highlight php %}
146146

147147
<?php
148-
$I->dontSeeInDatabase('users', array('name' => 'Davert', 'email' => 'davert * `mail.com'));`
148+
$I->dontSeeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com'));
149149

150150
{% endhighlight %}
151151
Fails if such user was found.
@@ -189,7 +189,7 @@ Inserts an SQL record into a database. This record will be erased after the test
189189
{% highlight php %}
190190

191191
<?php
192-
$I->haveInDatabase('users', array('name' => 'miles', 'email' => 'miles * `davis.com'));`
192+
$I->haveInDatabase('users', array('name' => 'miles', 'email' => 'miles@davis.com'));
193193
?>
194194

195195
{% endhighlight %}
@@ -208,7 +208,7 @@ Provide table name and column values.
208208
{% highlight php %}
209209

210210
<?php
211-
$I->seeInDatabase('users', array('name' => 'Davert', 'email' => 'davert * `mail.com'));`
211+
$I->seeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com'));
212212

213213
{% endhighlight %}
214214
Fails if no such user found.

docs/modules/FTP.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ $I->dontSeeInThisFile('codeception/codeception');
194194

195195
{% endhighlight %}
196196

197-
* `param` $text
197+
* `param string` $text
198198

199199

200200
#### grabDirectory
@@ -383,7 +383,7 @@ $I->seeFileContentsEqual('3192');
383383

384384
{% endhighlight %}
385385

386-
* `param` $text
386+
* `param string` $text
387387

388388

389389
#### seeFileFound
@@ -435,7 +435,7 @@ $I->seeInThisFile('codeception/codeception');
435435

436436
{% endhighlight %}
437437

438-
* `param` $text
438+
* `param string` $text
439439

440440

441441
#### seeNumberNewLines
@@ -460,7 +460,7 @@ $I->seeNumberNewLines(5);
460460

461461
Checks that contents of currently opened file matches $regex
462462

463-
* `param` $regex
463+
* `param string` $regex
464464

465465

466466
#### writeToFile

docs/modules/Facebook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Get facebook test user be created.
141141
Get facebook test user be logged in on facebook.
142142
This is done by going to facebook.com
143143

144-
* `throws` ModuleConfigException
144+
@throws ModuleConfigException
145145

146146

147147
#### postToFacebookAsTestUser

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy