@@ -83,15 +83,15 @@ PhpBrowser and Framework modules return `Symfony\Component\DomCrawler\Crawler` i
83
83
84
84
Uri of currently opened page.
85
85
* `return` string
86
- * ` throws` ModuleException
86
+ @ throws ModuleException
87
87
88
88
89
89
#### _getUrl
90
90
91
91
*hidden API method, expected to be used from Helper classes*
92
92
93
93
Returns URL of a host.
94
- * ` throws` ModuleConfigException
94
+ @ throws ModuleConfigException
95
95
96
96
97
97
#### _savePageSource
@@ -206,7 +206,7 @@ $I->appendField('#myTextField', 'appended');
206
206
207
207
* ` param string ` $field
208
208
* ` param string ` $value
209
- * ` throws ` \Codeception\Exception\ElementNotFound
209
+ @ throws \Codeception\Exception\ElementNotFound
210
210
211
211
212
212
#### attachFile
@@ -217,7 +217,7 @@ Attaches a file relative to the Codeception data directory to the given file upl
217
217
218
218
<? php
219
219
// file is stored in 'tests/_data/prices.xls'
220
- $I-> attachFile('input[ * ` type="file"]',` 'prices.xls');
220
+ $I-> attachFile('input[@ type="file"]', 'prices.xls');
221
221
?>
222
222
223
223
{% endhighlight %}
@@ -268,7 +268,7 @@ $I->click('Submit');
268
268
// CSS button
269
269
$I->click('#form input[type=submit]');
270
270
// XPath
271
- $I->click('//form/*[ * ` type=submit]');`
271
+ $I->click('//form/*[@ type=submit]');
272
272
// link in context
273
273
$I->click('Logout', '#nav');
274
274
// using strict locator
@@ -281,18 +281,62 @@ $I->click(['link' => 'Login']);
281
281
* ` param ` $context
282
282
283
283
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
+
284
309
#### clickWithRightButton
285
310
286
311
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.
287
316
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
290
332
291
333
292
334
#### debugWebDriverLogs
293
335
294
336
Print out latest Selenium Logs in debug mode
295
337
338
+ * ` param TestInterface ` $test
339
+
296
340
297
341
#### dontSee
298
342
@@ -440,7 +484,7 @@ $I->dontSeeInField('Body','Type your comment here');
440
484
$I->dontSeeInField('form textarea[name=body]','Type your comment here');
441
485
$I->dontSeeInField('form input[type=hidden]','hidden_value');
442
486
$I->dontSeeInField('#searchform input','Search');
443
- $I->dontSeeInField('//form/*[ * ` name=search]','Search');`
487
+ $I->dontSeeInField('//form/*[@ name=search]','Search');
444
488
$I->dontSeeInField(['name' => 'search'], 'Search');
445
489
?>
446
490
@@ -569,7 +613,7 @@ $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
569
613
Performs a double-click on an element matched by CSS or XPath.
570
614
571
615
* ` param ` $cssOrXPath
572
- * ` throws ` \Codeception\Exception\ElementNotFound
616
+ @ throws \Codeception\Exception\ElementNotFound
573
617
574
618
575
619
#### dragAndDrop
@@ -633,8 +677,8 @@ Fills a text field or textarea with the given string.
633
677
{% highlight php %}
634
678
635
679
<? 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');
638
682
?>
639
683
640
684
{% endhighlight %}
@@ -757,7 +801,7 @@ If a fuzzy locator is used, the field is found by field name, CSS, and XPath.
757
801
<? php
758
802
$name = $I-> grabValueFrom('Name');
759
803
$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']');
761
805
$name = $I->grabValueFrom(['name' => 'username']);
762
806
?>
763
807
@@ -808,13 +852,16 @@ Moves forward in history.
808
852
#### moveMouseOver
809
853
810
854
Move mouse over the first element matched by the given locator.
855
+ If the first parameter null then the page is used.
811
856
If the second and third parameters are given,
812
857
then the mouse is moved to an offset of the element's top-left corner.
813
858
Otherwise, the mouse is moved to the center of the element.
814
859
815
860
{% highlight php %}
816
861
817
862
<? php
863
+ $I-> moveMouseOver(['css' => '.checkout']);
864
+ $I->moveMouseOver(null, 20, 50);
818
865
$I->moveMouseOver(['css' => '.checkout'], 20, 50);
819
866
?>
820
867
@@ -824,7 +871,7 @@ $I->moveMouseOver(['css' => '.checkout'], 20, 50);
824
871
* ` param int ` $offsetX
825
872
* ` param int ` $offsetY
826
873
827
- * ` throws ` \Codeception\Exception\ElementNotFound
874
+ @ throws \Codeception\Exception\ElementNotFound
828
875
829
876
830
877
#### pauseExecution
@@ -850,15 +897,15 @@ For special keys use key constants from WebDriverKeys class.
850
897
$I->pressKey('#page','a'); // => olda
851
898
$I->pressKey('#page',array('ctrl','a'),'new'); //=> new
852
899
$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
854
901
$I->pressKey('#name', array('ctrl', 'a'), \Facebook\WebDriver\WebDriverKeys::DELETE); //=>''
855
902
?>
856
903
857
904
{% endhighlight %}
858
905
859
906
* ` param ` $element
860
907
* ` 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
862
909
863
910
864
911
#### reloadPage
@@ -960,7 +1007,7 @@ Checks that the specified checkbox is checked.
960
1007
<? php
961
1008
$I-> seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
962
1009
$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]');
964
1011
?>
965
1012
966
1013
{% endhighlight %}
@@ -1039,7 +1086,7 @@ $I->seeElement(['css' => 'form input'], ['name' => 'login']);
1039
1086
1040
1087
* ` param ` $selector
1041
1088
* ` param array ` $attributes
1042
- * ` return `
1089
+ @ return
1043
1090
1044
1091
1045
1092
#### seeElementInDOM
@@ -1087,7 +1134,7 @@ $I->seeInField('Body','Type your comment here');
1087
1134
$I->seeInField('form textarea[name=body]','Type your comment here');
1088
1135
$I->seeInField('form input[type=hidden]','hidden_value');
1089
1136
$I->seeInField('#searchform input','Search');
1090
- $I->seeInField('//form/*[ * ` name=search]','Search');`
1137
+ $I->seeInField('//form/*[@ name=search]','Search');
1091
1138
$I->seeInField(['name' => 'search'], 'Search');
1092
1139
?>
1093
1140
@@ -1157,9 +1204,9 @@ $form = [
1157
1204
'checkbox1' => true,
1158
1205
// ...
1159
1206
];
1160
- $I->submitForm('//form[ * ` id=my-form]',` $form, 'submitButton');
1207
+ $I->submitForm('//form[@ id=my-form]', $form, 'submitButton');
1161
1208
// $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);
1163
1210
?>
1164
1211
1165
1212
{% endhighlight %}
@@ -1287,7 +1334,7 @@ Selects an option in a select tag or in radio button group.
1287
1334
<? php
1288
1335
$I-> selectOption('form select[name=account]', 'Premium');
1289
1336
$I->selectOption('form input[name=payment]', 'Monthly');
1290
- $I->selectOption('//form/select[ * ` name=account]',` 'Monthly');
1337
+ $I->selectOption('//form/select[@ name=account]', 'Monthly');
1291
1338
?>
1292
1339
1293
1340
{% endhighlight %}
@@ -1426,9 +1473,9 @@ $form = [
1426
1473
'checkbox1' => true,
1427
1474
// ...
1428
1475
];
1429
- $I->submitForm('//form[ * ` id=my-form]',` $form, 'submitButton');
1476
+ $I->submitForm('//form[@ id=my-form]', $form, 'submitButton');
1430
1477
// $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);
1432
1479
?>
1433
1480
1434
1481
{% endhighlight %}
@@ -1606,15 +1653,19 @@ $I->uncheckOption('#notify');
1606
1653
1607
1654
1608
1655
#### unselectOption
1609
- __not documented__
1656
+
1657
+ Unselect an option in the given select box.
1658
+
1659
+ * `param` $select
1660
+ * `param` $option
1610
1661
1611
1662
1612
1663
#### wait
1613
1664
1614
1665
Wait for $timeout seconds.
1615
1666
1616
1667
* `param int` $timeout secs
1617
- * ` throws` \Codeception\Exception\TestRuntimeException
1668
+ @ throws \Codeception\Exception\TestRuntimeException
1618
1669
1619
1670
1620
1671
#### waitForElement
@@ -1633,7 +1684,7 @@ $I->click('#agree_button');
1633
1684
1634
1685
* `param` $element
1635
1686
* `param int` $timeout seconds
1636
- * ` throws` \Exception
1687
+ @ throws \Exception
1637
1688
1638
1689
1639
1690
#### waitForElementChange
@@ -1656,7 +1707,7 @@ $I->waitForElementChange('#menu', function(WebDriverElement $el) {
1656
1707
* `param` $element
1657
1708
* `param \Closure` $callback
1658
1709
* `param int` $timeout seconds
1659
- * ` throws` \Codeception\Exception\ElementNotFound
1710
+ @ throws \Codeception\Exception\ElementNotFound
1660
1711
1661
1712
1662
1713
#### waitForElementNotVisible
@@ -1674,7 +1725,7 @@ $I->waitForElementNotVisible('#agree_button', 30); // secs
1674
1725
1675
1726
* `param` $element
1676
1727
* `param int` $timeout seconds
1677
- * ` throws` \Exception
1728
+ @ throws \Exception
1678
1729
1679
1730
1680
1731
#### waitForElementVisible
@@ -1693,7 +1744,7 @@ $I->click('#agree_button');
1693
1744
1694
1745
* `param` $element
1695
1746
* `param int` $timeout seconds
1696
- * ` throws` \Exception
1747
+ @ throws \Exception
1697
1748
1698
1749
1699
1750
#### waitForJS
@@ -1734,6 +1785,6 @@ $I->waitForText('foo', 30, '.title'); // secs
1734
1785
* `param string` $text
1735
1786
* `param int` $timeout seconds
1736
1787
* `param null` $selector
1737
- * ` throws` \Exception
1788
+ @ throws \Exception
1738
1789
1739
1790
<p> </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>
0 commit comments