Test Failed
Push — master ( d3990f...a5a1b1 )
by Martin
02:27
created

AcceptanceTesterActions::seeNumRecords()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php  //[STAMP] 5f16d8a6ac4e58d772efbe538a3cf4cc
2
namespace _generated;
3
4
// This class was automatically generated by build task
5
// You should not change it manually as it will be overwritten on next build
6
// @codingStandardsIgnoreFile
7
8
use Codeception\Module\PhpBrowser;
9
use Helper\Acceptance;
10
use Codeception\Module\Db;
11
12
trait AcceptanceTesterActions
13
{
14
    /**
15
     * @return \Codeception\Scenario
16
     */
17
    abstract protected function getScenario();
18
19
    
20
    /**
21
     * [!] Method is generated. Documentation taken from corresponding module.
22
     *
23
     * Alias to `haveHttpHeader`
24
     *
25
     * @param $name
26
     * @param $value
27
     * @see \Codeception\Module\PhpBrowser::setHeader()
28
     */
29
    public function setHeader($name, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
        return $this->getScenario()->runStep(new \Codeception\Step\Action('setHeader', func_get_args()));
31
    }
32
33
 
34
    /**
35
     * [!] Method is generated. Documentation taken from corresponding module.
36
     *
37
     * Authenticates user for HTTP_AUTH
38
     *
39
     * @param $username
40
     * @param $password
41
     * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated()
42
     */
43
    public function amHttpAuthenticated($username, $password) {
0 ignored issues
show
Unused Code introduced by
The parameter $username is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $password is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
44
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
45
    }
46
47
 
48
    /**
49
     * [!] Method is generated. Documentation taken from corresponding module.
50
     *
51
     * Open web page at the given absolute URL and sets its hostname as the base host.
52
     *
53
     * ``` php
54
     * <?php
55
     * $I->amOnUrl('http://codeception.com');
56
     * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
57
     * ?>
58
     * ```
59
     * @see \Codeception\Module\PhpBrowser::amOnUrl()
60
     */
61
    public function amOnUrl($url) {
0 ignored issues
show
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
62
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));
63
    }
64
65
 
66
    /**
67
     * [!] Method is generated. Documentation taken from corresponding module.
68
     *
69
     * Changes the subdomain for the 'url' configuration parameter.
70
     * Does not open a page; use `amOnPage` for that.
71
     *
72
     * ``` php
73
     * <?php
74
     * // If config is: 'http://mysite.com'
75
     * // or config is: 'http://www.mysite.com'
76
     * // or config is: 'http://company.mysite.com'
77
     *
78
     * $I->amOnSubdomain('user');
79
     * $I->amOnPage('/');
80
     * // moves to http://user.mysite.com/
81
     * ?>
82
     * ```
83
     *
84
     * @param $subdomain
85
     *
86
     * @return mixed
87
     * @see \Codeception\Module\PhpBrowser::amOnSubdomain()
88
     */
89
    public function amOnSubdomain($subdomain) {
0 ignored issues
show
Unused Code introduced by
The parameter $subdomain is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
90
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
91
    }
92
93
 
94
    /**
95
     * [!] Method is generated. Documentation taken from corresponding module.
96
     *
97
     * Low-level API method.
98
     * If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
99
     *
100
     * Example:
101
     *
102
     * ``` php
103
     * <?php
104
     * $I->executeInGuzzle(function (\GuzzleHttp\Client $client) {
105
     *      $client->get('/get', ['query' => ['foo' => 'bar']]);
106
     * });
107
     * ?>
108
     * ```
109
     *
110
     * It is not recommended to use this command on a regular basis.
111
     * If Codeception lacks important Guzzle Client methods, implement them and submit patches.
112
     *
113
     * @param callable $function
114
     * @see \Codeception\Module\PhpBrowser::executeInGuzzle()
115
     */
116
    public function executeInGuzzle($function) {
0 ignored issues
show
Unused Code introduced by
The parameter $function is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
117
        return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
118
    }
119
120
 
121
    /**
122
     * [!] Method is generated. Documentation taken from corresponding module.
123
     *
124
     * Sets the HTTP header to the passed value - which is used on
125
     * subsequent HTTP requests through PhpBrowser.
126
     *
127
     * Example:
128
     * ```php
129
     * <?php
130
     * $I->setHeader('X-Requested-With', 'Codeception');
131
     * $I->amOnPage('test-headers.php');
132
     * ?>
133
     * ```
134
     *
135
     * @param string $name the name of the request header
136
     * @param string $value the value to set it to for subsequent
137
     *        requests
138
     * @see \Codeception\Lib\InnerBrowser::haveHttpHeader()
139
     */
140
    public function haveHttpHeader($name, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
141
        return $this->getScenario()->runStep(new \Codeception\Step\Action('haveHttpHeader', func_get_args()));
142
    }
143
144
 
145
    /**
146
     * [!] Method is generated. Documentation taken from corresponding module.
147
     *
148
     * Deletes the header with the passed name.  Subsequent requests
149
     * will not have the deleted header in its request.
150
     *
151
     * Example:
152
     * ```php
153
     * <?php
154
     * $I->haveHttpHeader('X-Requested-With', 'Codeception');
155
     * $I->amOnPage('test-headers.php');
156
     * // ...
157
     * $I->deleteHeader('X-Requested-With');
158
     * $I->amOnPage('some-other-page.php');
159
     * ?>
160
     * ```
161
     *
162
     * @param string $name the name of the header to delete.
163
     * @see \Codeception\Lib\InnerBrowser::deleteHeader()
164
     */
165
    public function deleteHeader($name) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
166
        return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
167
    }
168
169
 
170
    /**
171
     * [!] Method is generated. Documentation taken from corresponding module.
172
     *
173
     * Opens the page for the given relative URI.
174
     *
175
     * ``` php
176
     * <?php
177
     * // opens front page
178
     * $I->amOnPage('/');
179
     * // opens /register page
180
     * $I->amOnPage('/register');
181
     * ```
182
     *
183
     * @param $page
184
     * @see \Codeception\Lib\InnerBrowser::amOnPage()
185
     */
186
    public function amOnPage($page) {
0 ignored issues
show
Unused Code introduced by
The parameter $page is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
187
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
188
    }
189
190
 
191
    /**
192
     * [!] Method is generated. Documentation taken from corresponding module.
193
     *
194
     * Perform a click on a link or a button, given by a locator.
195
     * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
196
     * For buttons, the "value" attribute, "name" attribute, and inner text are searched.
197
     * For links, the link text is searched.
198
     * For images, the "alt" attribute and inner text of any parent links are searched.
199
     *
200
     * The second parameter is a context (CSS or XPath locator) to narrow the search.
201
     *
202
     * Note that if the locator matches a button of type `submit`, the form will be submitted.
203
     *
204
     * ``` php
205
     * <?php
206
     * // simple link
207
     * $I->click('Logout');
208
     * // button of form
209
     * $I->click('Submit');
210
     * // CSS button
211
     * $I->click('#form input[type=submit]');
212
     * // XPath
213
     * $I->click('//form/*[@type=submit]');
214
     * // link in context
215
     * $I->click('Logout', '#nav');
216
     * // using strict locator
217
     * $I->click(['link' => 'Login']);
218
     * ?>
219
     * ```
220
     *
221
     * @param $link
222
     * @param $context
223
     * @see \Codeception\Lib\InnerBrowser::click()
224
     */
225
    public function click($link, $context = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $link is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $context is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
226
        return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args()));
227
    }
228
229
 
230
    /**
231
     * [!] Method is generated. Documentation taken from corresponding module.
232
     *
233
     * Checks that the current page contains the given string (case insensitive).
234
     *
235
     * You can specify a specific HTML element (via CSS or XPath) as the second
236
     * parameter to only search within that element.
237
     *
238
     * ``` php
239
     * <?php
240
     * $I->see('Logout');                        // I can suppose user is logged in
241
     * $I->see('Sign Up', 'h1');                 // I can suppose it's a signup page
242
     * $I->see('Sign Up', '//body/h1');          // with XPath
243
     * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
244
     * ```
245
     *
246
     * Note that the search is done after stripping all HTML tags from the body,
247
     * so `$I->see('strong')` will return true for strings like:
248
     *
249
     *   - `<p>I am Stronger than thou</p>`
250
     *   - `<script>document.createElement('strong');</script>`
251
     *
252
     * But will *not* be true for strings like:
253
     *
254
     *   - `<strong>Home</strong>`
255
     *   - `<div class="strong">Home</strong>`
256
     *   - `<!-- strong -->`
257
     *
258
     * For checking the raw source code, use `seeInSource()`.
259
     *
260
     * @param      $text
261
     * @param null $selector
262
     * Conditional Assertion: Test won't be stopped on fail
263
     * @see \Codeception\Lib\InnerBrowser::see()
264
     */
265
    public function canSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
266
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
267
    }
268
    /**
269
     * [!] Method is generated. Documentation taken from corresponding module.
270
     *
271
     * Checks that the current page contains the given string (case insensitive).
272
     *
273
     * You can specify a specific HTML element (via CSS or XPath) as the second
274
     * parameter to only search within that element.
275
     *
276
     * ``` php
277
     * <?php
278
     * $I->see('Logout');                        // I can suppose user is logged in
279
     * $I->see('Sign Up', 'h1');                 // I can suppose it's a signup page
280
     * $I->see('Sign Up', '//body/h1');          // with XPath
281
     * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
282
     * ```
283
     *
284
     * Note that the search is done after stripping all HTML tags from the body,
285
     * so `$I->see('strong')` will return true for strings like:
286
     *
287
     *   - `<p>I am Stronger than thou</p>`
288
     *   - `<script>document.createElement('strong');</script>`
289
     *
290
     * But will *not* be true for strings like:
291
     *
292
     *   - `<strong>Home</strong>`
293
     *   - `<div class="strong">Home</strong>`
294
     *   - `<!-- strong -->`
295
     *
296
     * For checking the raw source code, use `seeInSource()`.
297
     *
298
     * @param      $text
299
     * @param null $selector
300
     * @see \Codeception\Lib\InnerBrowser::see()
301
     */
302
    public function see($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
303
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
304
    }
305
306
 
307
    /**
308
     * [!] Method is generated. Documentation taken from corresponding module.
309
     *
310
     * Checks that the current page doesn't contain the text specified (case insensitive).
311
     * Give a locator as the second parameter to match a specific region.
312
     *
313
     * ```php
314
     * <?php
315
     * $I->dontSee('Login');                         // I can suppose user is already logged in
316
     * $I->dontSee('Sign Up','h1');                  // I can suppose it's not a signup page
317
     * $I->dontSee('Sign Up','//body/h1');           // with XPath
318
     * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
319
     * ```
320
     *
321
     * Note that the search is done after stripping all HTML tags from the body,
322
     * so `$I->dontSee('strong')` will fail on strings like:
323
     *
324
     *   - `<p>I am Stronger than thou</p>`
325
     *   - `<script>document.createElement('strong');</script>`
326
     *
327
     * But will ignore strings like:
328
     *
329
     *   - `<strong>Home</strong>`
330
     *   - `<div class="strong">Home</strong>`
331
     *   - `<!-- strong -->`
332
     *
333
     * For checking the raw source code, use `seeInSource()`.
334
     *
335
     * @param      $text
336
     * @param null $selector
337
     * Conditional Assertion: Test won't be stopped on fail
338
     * @see \Codeception\Lib\InnerBrowser::dontSee()
339
     */
340
    public function cantSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
341
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
342
    }
343
    /**
344
     * [!] Method is generated. Documentation taken from corresponding module.
345
     *
346
     * Checks that the current page doesn't contain the text specified (case insensitive).
347
     * Give a locator as the second parameter to match a specific region.
348
     *
349
     * ```php
350
     * <?php
351
     * $I->dontSee('Login');                         // I can suppose user is already logged in
352
     * $I->dontSee('Sign Up','h1');                  // I can suppose it's not a signup page
353
     * $I->dontSee('Sign Up','//body/h1');           // with XPath
354
     * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
355
     * ```
356
     *
357
     * Note that the search is done after stripping all HTML tags from the body,
358
     * so `$I->dontSee('strong')` will fail on strings like:
359
     *
360
     *   - `<p>I am Stronger than thou</p>`
361
     *   - `<script>document.createElement('strong');</script>`
362
     *
363
     * But will ignore strings like:
364
     *
365
     *   - `<strong>Home</strong>`
366
     *   - `<div class="strong">Home</strong>`
367
     *   - `<!-- strong -->`
368
     *
369
     * For checking the raw source code, use `seeInSource()`.
370
     *
371
     * @param      $text
372
     * @param null $selector
373
     * @see \Codeception\Lib\InnerBrowser::dontSee()
374
     */
375
    public function dontSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
376
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
377
    }
378
379
 
380
    /**
381
     * [!] Method is generated. Documentation taken from corresponding module.
382
     *
383
     * Checks that the current page contains the given string in its
384
     * raw source code.
385
     *
386
     * ``` php
387
     * <?php
388
     * $I->seeInSource('<h1>Green eggs &amp; ham</h1>');
389
     * ```
390
     *
391
     * @param      $raw
392
     * Conditional Assertion: Test won't be stopped on fail
393
     * @see \Codeception\Lib\InnerBrowser::seeInSource()
394
     */
395
    public function canSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
396
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
397
    }
398
    /**
399
     * [!] Method is generated. Documentation taken from corresponding module.
400
     *
401
     * Checks that the current page contains the given string in its
402
     * raw source code.
403
     *
404
     * ``` php
405
     * <?php
406
     * $I->seeInSource('<h1>Green eggs &amp; ham</h1>');
407
     * ```
408
     *
409
     * @param      $raw
410
     * @see \Codeception\Lib\InnerBrowser::seeInSource()
411
     */
412
    public function seeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
413
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
414
    }
415
416
 
417
    /**
418
     * [!] Method is generated. Documentation taken from corresponding module.
419
     *
420
     * Checks that the current page contains the given string in its
421
     * raw source code.
422
     *
423
     * ```php
424
     * <?php
425
     * $I->dontSeeInSource('<h1>Green eggs &amp; ham</h1>');
426
     * ```
427
     *
428
     * @param      $raw
429
     * Conditional Assertion: Test won't be stopped on fail
430
     * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
431
     */
432
    public function cantSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
433
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
434
    }
435
    /**
436
     * [!] Method is generated. Documentation taken from corresponding module.
437
     *
438
     * Checks that the current page contains the given string in its
439
     * raw source code.
440
     *
441
     * ```php
442
     * <?php
443
     * $I->dontSeeInSource('<h1>Green eggs &amp; ham</h1>');
444
     * ```
445
     *
446
     * @param      $raw
447
     * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
448
     */
449
    public function dontSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
450
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
451
    }
452
453
 
454
    /**
455
     * [!] Method is generated. Documentation taken from corresponding module.
456
     *
457
     * Checks that there's a link with the specified text.
458
     * Give a full URL as the second parameter to match links with that exact URL.
459
     *
460
     * ``` php
461
     * <?php
462
     * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
463
     * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
464
     * ?>
465
     * ```
466
     *
467
     * @param      $text
468
     * @param null $url
469
     * Conditional Assertion: Test won't be stopped on fail
470
     * @see \Codeception\Lib\InnerBrowser::seeLink()
471
     */
472
    public function canSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
473
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
474
    }
475
    /**
476
     * [!] Method is generated. Documentation taken from corresponding module.
477
     *
478
     * Checks that there's a link with the specified text.
479
     * Give a full URL as the second parameter to match links with that exact URL.
480
     *
481
     * ``` php
482
     * <?php
483
     * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
484
     * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
485
     * ?>
486
     * ```
487
     *
488
     * @param      $text
489
     * @param null $url
490
     * @see \Codeception\Lib\InnerBrowser::seeLink()
491
     */
492
    public function seeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
493
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
494
    }
495
496
 
497
    /**
498
     * [!] Method is generated. Documentation taken from corresponding module.
499
     *
500
     * Checks that the page doesn't contain a link with the given string.
501
     * If the second parameter is given, only links with a matching "href" attribute will be checked.
502
     *
503
     * ``` php
504
     * <?php
505
     * $I->dontSeeLink('Logout'); // I suppose user is not logged in
506
     * $I->dontSeeLink('Checkout now', '/store/cart.php');
507
     * ?>
508
     * ```
509
     *
510
     * @param $text
511
     * @param null $url
512
     * Conditional Assertion: Test won't be stopped on fail
513
     * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
514
     */
515
    public function cantSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
516
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
517
    }
518
    /**
519
     * [!] Method is generated. Documentation taken from corresponding module.
520
     *
521
     * Checks that the page doesn't contain a link with the given string.
522
     * If the second parameter is given, only links with a matching "href" attribute will be checked.
523
     *
524
     * ``` php
525
     * <?php
526
     * $I->dontSeeLink('Logout'); // I suppose user is not logged in
527
     * $I->dontSeeLink('Checkout now', '/store/cart.php');
528
     * ?>
529
     * ```
530
     *
531
     * @param $text
532
     * @param null $url
533
     * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
534
     */
535
    public function dontSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
536
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
537
    }
538
539
 
540
    /**
541
     * [!] Method is generated. Documentation taken from corresponding module.
542
     *
543
     * Checks that current URI contains the given string.
544
     *
545
     * ``` php
546
     * <?php
547
     * // to match: /home/dashboard
548
     * $I->seeInCurrentUrl('home');
549
     * // to match: /users/1
550
     * $I->seeInCurrentUrl('/users/');
551
     * ?>
552
     * ```
553
     *
554
     * @param $uri
555
     * Conditional Assertion: Test won't be stopped on fail
556
     * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
557
     */
558
    public function canSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
559
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
560
    }
561
    /**
562
     * [!] Method is generated. Documentation taken from corresponding module.
563
     *
564
     * Checks that current URI contains the given string.
565
     *
566
     * ``` php
567
     * <?php
568
     * // to match: /home/dashboard
569
     * $I->seeInCurrentUrl('home');
570
     * // to match: /users/1
571
     * $I->seeInCurrentUrl('/users/');
572
     * ?>
573
     * ```
574
     *
575
     * @param $uri
576
     * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
577
     */
578
    public function seeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
579
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
580
    }
581
582
 
583
    /**
584
     * [!] Method is generated. Documentation taken from corresponding module.
585
     *
586
     * Checks that the current URI doesn't contain the given string.
587
     *
588
     * ``` php
589
     * <?php
590
     * $I->dontSeeInCurrentUrl('/users/');
591
     * ?>
592
     * ```
593
     *
594
     * @param $uri
595
     * Conditional Assertion: Test won't be stopped on fail
596
     * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
597
     */
598
    public function cantSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
599
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
600
    }
601
    /**
602
     * [!] Method is generated. Documentation taken from corresponding module.
603
     *
604
     * Checks that the current URI doesn't contain the given string.
605
     *
606
     * ``` php
607
     * <?php
608
     * $I->dontSeeInCurrentUrl('/users/');
609
     * ?>
610
     * ```
611
     *
612
     * @param $uri
613
     * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
614
     */
615
    public function dontSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
616
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
617
    }
618
619
 
620
    /**
621
     * [!] Method is generated. Documentation taken from corresponding module.
622
     *
623
     * Checks that the current URL is equal to the given string.
624
     * Unlike `seeInCurrentUrl`, this only matches the full URL.
625
     *
626
     * ``` php
627
     * <?php
628
     * // to match root url
629
     * $I->seeCurrentUrlEquals('/');
630
     * ?>
631
     * ```
632
     *
633
     * @param $uri
634
     * Conditional Assertion: Test won't be stopped on fail
635
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
636
     */
637
    public function canSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
638
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
639
    }
640
    /**
641
     * [!] Method is generated. Documentation taken from corresponding module.
642
     *
643
     * Checks that the current URL is equal to the given string.
644
     * Unlike `seeInCurrentUrl`, this only matches the full URL.
645
     *
646
     * ``` php
647
     * <?php
648
     * // to match root url
649
     * $I->seeCurrentUrlEquals('/');
650
     * ?>
651
     * ```
652
     *
653
     * @param $uri
654
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
655
     */
656
    public function seeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
657
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
658
    }
659
660
 
661
    /**
662
     * [!] Method is generated. Documentation taken from corresponding module.
663
     *
664
     * Checks that the current URL doesn't equal the given string.
665
     * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
666
     *
667
     * ``` php
668
     * <?php
669
     * // current url is not root
670
     * $I->dontSeeCurrentUrlEquals('/');
671
     * ?>
672
     * ```
673
     *
674
     * @param $uri
675
     * Conditional Assertion: Test won't be stopped on fail
676
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
677
     */
678
    public function cantSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
679
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
680
    }
681
    /**
682
     * [!] Method is generated. Documentation taken from corresponding module.
683
     *
684
     * Checks that the current URL doesn't equal the given string.
685
     * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
686
     *
687
     * ``` php
688
     * <?php
689
     * // current url is not root
690
     * $I->dontSeeCurrentUrlEquals('/');
691
     * ?>
692
     * ```
693
     *
694
     * @param $uri
695
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
696
     */
697
    public function dontSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
698
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
699
    }
700
701
 
702
    /**
703
     * [!] Method is generated. Documentation taken from corresponding module.
704
     *
705
     * Checks that the current URL matches the given regular expression.
706
     *
707
     * ``` php
708
     * <?php
709
     * // to match root url
710
     * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
711
     * ?>
712
     * ```
713
     *
714
     * @param $uri
715
     * Conditional Assertion: Test won't be stopped on fail
716
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
717
     */
718
    public function canSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
719
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
720
    }
721
    /**
722
     * [!] Method is generated. Documentation taken from corresponding module.
723
     *
724
     * Checks that the current URL matches the given regular expression.
725
     *
726
     * ``` php
727
     * <?php
728
     * // to match root url
729
     * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
730
     * ?>
731
     * ```
732
     *
733
     * @param $uri
734
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
735
     */
736
    public function seeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
737
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
738
    }
739
740
 
741
    /**
742
     * [!] Method is generated. Documentation taken from corresponding module.
743
     *
744
     * Checks that current url doesn't match the given regular expression.
745
     *
746
     * ``` php
747
     * <?php
748
     * // to match root url
749
     * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
750
     * ?>
751
     * ```
752
     *
753
     * @param $uri
754
     * Conditional Assertion: Test won't be stopped on fail
755
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
756
     */
757
    public function cantSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
758
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
759
    }
760
    /**
761
     * [!] Method is generated. Documentation taken from corresponding module.
762
     *
763
     * Checks that current url doesn't match the given regular expression.
764
     *
765
     * ``` php
766
     * <?php
767
     * // to match root url
768
     * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
769
     * ?>
770
     * ```
771
     *
772
     * @param $uri
773
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
774
     */
775
    public function dontSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
776
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
777
    }
778
779
 
780
    /**
781
     * [!] Method is generated. Documentation taken from corresponding module.
782
     *
783
     * Executes the given regular expression against the current URI and returns the first match.
784
     * If no parameters are provided, the full URI is returned.
785
     *
786
     * ``` php
787
     * <?php
788
     * $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
789
     * $uri = $I->grabFromCurrentUrl();
790
     * ?>
791
     * ```
792
     *
793
     * @param null $uri
794
     *
795
     * @return mixed
796
     * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
797
     */
798
    public function grabFromCurrentUrl($uri = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
799
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
800
    }
801
802
 
803
    /**
804
     * [!] Method is generated. Documentation taken from corresponding module.
805
     *
806
     * Checks that the specified checkbox is checked.
807
     *
808
     * ``` php
809
     * <?php
810
     * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
811
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
812
     * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
813
     * ?>
814
     * ```
815
     *
816
     * @param $checkbox
817
     * Conditional Assertion: Test won't be stopped on fail
818
     * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
819
     */
820
    public function canSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
821
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
822
    }
823
    /**
824
     * [!] Method is generated. Documentation taken from corresponding module.
825
     *
826
     * Checks that the specified checkbox is checked.
827
     *
828
     * ``` php
829
     * <?php
830
     * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
831
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
832
     * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
833
     * ?>
834
     * ```
835
     *
836
     * @param $checkbox
837
     * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
838
     */
839
    public function seeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
840
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
841
    }
842
843
 
844
    /**
845
     * [!] Method is generated. Documentation taken from corresponding module.
846
     *
847
     * Check that the specified checkbox is unchecked.
848
     *
849
     * ``` php
850
     * <?php
851
     * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
852
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
853
     * ?>
854
     * ```
855
     *
856
     * @param $checkbox
857
     * Conditional Assertion: Test won't be stopped on fail
858
     * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
859
     */
860
    public function cantSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
861
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
862
    }
863
    /**
864
     * [!] Method is generated. Documentation taken from corresponding module.
865
     *
866
     * Check that the specified checkbox is unchecked.
867
     *
868
     * ``` php
869
     * <?php
870
     * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
871
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
872
     * ?>
873
     * ```
874
     *
875
     * @param $checkbox
876
     * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
877
     */
878
    public function dontSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
879
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
880
    }
881
882
 
883
    /**
884
     * [!] Method is generated. Documentation taken from corresponding module.
885
     *
886
     * Checks that the given input field or textarea contains the given value.
887
     * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
888
     *
889
     * ``` php
890
     * <?php
891
     * $I->seeInField('Body','Type your comment here');
892
     * $I->seeInField('form textarea[name=body]','Type your comment here');
893
     * $I->seeInField('form input[type=hidden]','hidden_value');
894
     * $I->seeInField('#searchform input','Search');
895
     * $I->seeInField('//form/*[@name=search]','Search');
896
     * $I->seeInField(['name' => 'search'], 'Search');
897
     * ?>
898
     * ```
899
     *
900
     * @param $field
901
     * @param $value
902
     * Conditional Assertion: Test won't be stopped on fail
903
     * @see \Codeception\Lib\InnerBrowser::seeInField()
904
     */
905
    public function canSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
906
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
907
    }
908
    /**
909
     * [!] Method is generated. Documentation taken from corresponding module.
910
     *
911
     * Checks that the given input field or textarea contains the given value.
912
     * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
913
     *
914
     * ``` php
915
     * <?php
916
     * $I->seeInField('Body','Type your comment here');
917
     * $I->seeInField('form textarea[name=body]','Type your comment here');
918
     * $I->seeInField('form input[type=hidden]','hidden_value');
919
     * $I->seeInField('#searchform input','Search');
920
     * $I->seeInField('//form/*[@name=search]','Search');
921
     * $I->seeInField(['name' => 'search'], 'Search');
922
     * ?>
923
     * ```
924
     *
925
     * @param $field
926
     * @param $value
927
     * @see \Codeception\Lib\InnerBrowser::seeInField()
928
     */
929
    public function seeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
930
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
931
    }
932
933
 
934
    /**
935
     * [!] Method is generated. Documentation taken from corresponding module.
936
     *
937
     * Checks that an input field or textarea doesn't contain the given value.
938
     * For fuzzy locators, the field is matched by label text, CSS and XPath.
939
     *
940
     * ``` php
941
     * <?php
942
     * $I->dontSeeInField('Body','Type your comment here');
943
     * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
944
     * $I->dontSeeInField('form input[type=hidden]','hidden_value');
945
     * $I->dontSeeInField('#searchform input','Search');
946
     * $I->dontSeeInField('//form/*[@name=search]','Search');
947
     * $I->dontSeeInField(['name' => 'search'], 'Search');
948
     * ?>
949
     * ```
950
     *
951
     * @param $field
952
     * @param $value
953
     * Conditional Assertion: Test won't be stopped on fail
954
     * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
955
     */
956
    public function cantSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
957
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
958
    }
959
    /**
960
     * [!] Method is generated. Documentation taken from corresponding module.
961
     *
962
     * Checks that an input field or textarea doesn't contain the given value.
963
     * For fuzzy locators, the field is matched by label text, CSS and XPath.
964
     *
965
     * ``` php
966
     * <?php
967
     * $I->dontSeeInField('Body','Type your comment here');
968
     * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
969
     * $I->dontSeeInField('form input[type=hidden]','hidden_value');
970
     * $I->dontSeeInField('#searchform input','Search');
971
     * $I->dontSeeInField('//form/*[@name=search]','Search');
972
     * $I->dontSeeInField(['name' => 'search'], 'Search');
973
     * ?>
974
     * ```
975
     *
976
     * @param $field
977
     * @param $value
978
     * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
979
     */
980
    public function dontSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
981
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
982
    }
983
984
 
985
    /**
986
     * [!] Method is generated. Documentation taken from corresponding module.
987
     *
988
     * Checks if the array of form parameters (name => value) are set on the form matched with the
989
     * passed selector.
990
     *
991
     * ``` php
992
     * <?php
993
     * $I->seeInFormFields('form[name=myform]', [
994
     *      'input1' => 'value',
995
     *      'input2' => 'other value',
996
     * ]);
997
     * ?>
998
     * ```
999
     *
1000
     * For multi-select elements, or to check values of multiple elements with the same name, an
1001
     * array may be passed:
1002
     *
1003
     * ``` php
1004
     * <?php
1005
     * $I->seeInFormFields('.form-class', [
1006
     *      'multiselect' => [
1007
     *          'value1',
1008
     *          'value2',
1009
     *      ],
1010
     *      'checkbox[]' => [
1011
     *          'a checked value',
1012
     *          'another checked value',
1013
     *      ],
1014
     * ]);
1015
     * ?>
1016
     * ```
1017
     *
1018
     * Additionally, checkbox values can be checked with a boolean.
1019
     *
1020
     * ``` php
1021
     * <?php
1022
     * $I->seeInFormFields('#form-id', [
1023
     *      'checkbox1' => true,        // passes if checked
1024
     *      'checkbox2' => false,       // passes if unchecked
1025
     * ]);
1026
     * ?>
1027
     * ```
1028
     *
1029
     * Pair this with submitForm for quick testing magic.
1030
     *
1031
     * ``` php
1032
     * <?php
1033
     * $form = [
1034
     *      'field1' => 'value',
1035
     *      'field2' => 'another value',
1036
     *      'checkbox1' => true,
1037
     *      // ...
1038
     * ];
1039
     * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
1040
     * // $I->amOnPage('/path/to/form-page') may be needed
1041
     * $I->seeInFormFields('//form[@id=my-form]', $form);
1042
     * ?>
1043
     * ```
1044
     *
1045
     * @param $formSelector
1046
     * @param $params
1047
     * Conditional Assertion: Test won't be stopped on fail
1048
     * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
1049
     */
1050
    public function canSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1051
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
1052
    }
1053
    /**
1054
     * [!] Method is generated. Documentation taken from corresponding module.
1055
     *
1056
     * Checks if the array of form parameters (name => value) are set on the form matched with the
1057
     * passed selector.
1058
     *
1059
     * ``` php
1060
     * <?php
1061
     * $I->seeInFormFields('form[name=myform]', [
1062
     *      'input1' => 'value',
1063
     *      'input2' => 'other value',
1064
     * ]);
1065
     * ?>
1066
     * ```
1067
     *
1068
     * For multi-select elements, or to check values of multiple elements with the same name, an
1069
     * array may be passed:
1070
     *
1071
     * ``` php
1072
     * <?php
1073
     * $I->seeInFormFields('.form-class', [
1074
     *      'multiselect' => [
1075
     *          'value1',
1076
     *          'value2',
1077
     *      ],
1078
     *      'checkbox[]' => [
1079
     *          'a checked value',
1080
     *          'another checked value',
1081
     *      ],
1082
     * ]);
1083
     * ?>
1084
     * ```
1085
     *
1086
     * Additionally, checkbox values can be checked with a boolean.
1087
     *
1088
     * ``` php
1089
     * <?php
1090
     * $I->seeInFormFields('#form-id', [
1091
     *      'checkbox1' => true,        // passes if checked
1092
     *      'checkbox2' => false,       // passes if unchecked
1093
     * ]);
1094
     * ?>
1095
     * ```
1096
     *
1097
     * Pair this with submitForm for quick testing magic.
1098
     *
1099
     * ``` php
1100
     * <?php
1101
     * $form = [
1102
     *      'field1' => 'value',
1103
     *      'field2' => 'another value',
1104
     *      'checkbox1' => true,
1105
     *      // ...
1106
     * ];
1107
     * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
1108
     * // $I->amOnPage('/path/to/form-page') may be needed
1109
     * $I->seeInFormFields('//form[@id=my-form]', $form);
1110
     * ?>
1111
     * ```
1112
     *
1113
     * @param $formSelector
1114
     * @param $params
1115
     * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
1116
     */
1117
    public function seeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1118
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
1119
    }
1120
1121
 
1122
    /**
1123
     * [!] Method is generated. Documentation taken from corresponding module.
1124
     *
1125
     * Checks if the array of form parameters (name => value) are not set on the form matched with
1126
     * the passed selector.
1127
     *
1128
     * ``` php
1129
     * <?php
1130
     * $I->dontSeeInFormFields('form[name=myform]', [
1131
     *      'input1' => 'non-existent value',
1132
     *      'input2' => 'other non-existent value',
1133
     * ]);
1134
     * ?>
1135
     * ```
1136
     *
1137
     * To check that an element hasn't been assigned any one of many values, an array can be passed
1138
     * as the value:
1139
     *
1140
     * ``` php
1141
     * <?php
1142
     * $I->dontSeeInFormFields('.form-class', [
1143
     *      'fieldName' => [
1144
     *          'This value shouldn\'t be set',
1145
     *          'And this value shouldn\'t be set',
1146
     *      ],
1147
     * ]);
1148
     * ?>
1149
     * ```
1150
     *
1151
     * Additionally, checkbox values can be checked with a boolean.
1152
     *
1153
     * ``` php
1154
     * <?php
1155
     * $I->dontSeeInFormFields('#form-id', [
1156
     *      'checkbox1' => true,        // fails if checked
1157
     *      'checkbox2' => false,       // fails if unchecked
1158
     * ]);
1159
     * ?>
1160
     * ```
1161
     *
1162
     * @param $formSelector
1163
     * @param $params
1164
     * Conditional Assertion: Test won't be stopped on fail
1165
     * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
1166
     */
1167
    public function cantSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1168
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
1169
    }
1170
    /**
1171
     * [!] Method is generated. Documentation taken from corresponding module.
1172
     *
1173
     * Checks if the array of form parameters (name => value) are not set on the form matched with
1174
     * the passed selector.
1175
     *
1176
     * ``` php
1177
     * <?php
1178
     * $I->dontSeeInFormFields('form[name=myform]', [
1179
     *      'input1' => 'non-existent value',
1180
     *      'input2' => 'other non-existent value',
1181
     * ]);
1182
     * ?>
1183
     * ```
1184
     *
1185
     * To check that an element hasn't been assigned any one of many values, an array can be passed
1186
     * as the value:
1187
     *
1188
     * ``` php
1189
     * <?php
1190
     * $I->dontSeeInFormFields('.form-class', [
1191
     *      'fieldName' => [
1192
     *          'This value shouldn\'t be set',
1193
     *          'And this value shouldn\'t be set',
1194
     *      ],
1195
     * ]);
1196
     * ?>
1197
     * ```
1198
     *
1199
     * Additionally, checkbox values can be checked with a boolean.
1200
     *
1201
     * ``` php
1202
     * <?php
1203
     * $I->dontSeeInFormFields('#form-id', [
1204
     *      'checkbox1' => true,        // fails if checked
1205
     *      'checkbox2' => false,       // fails if unchecked
1206
     * ]);
1207
     * ?>
1208
     * ```
1209
     *
1210
     * @param $formSelector
1211
     * @param $params
1212
     * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
1213
     */
1214
    public function dontSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1215
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
1216
    }
1217
1218
 
1219
    /**
1220
     * [!] Method is generated. Documentation taken from corresponding module.
1221
     *
1222
     * Submits the given form on the page, optionally with the given form
1223
     * values.  Pass the form field's values as an array in the second
1224
     * parameter.
1225
     *
1226
     * Although this function can be used as a short-hand version of
1227
     * `fillField()`, `selectOption()`, `click()` etc. it has some important
1228
     * differences:
1229
     *
1230
     *  * Only field *names* may be used, not CSS/XPath selectors nor field labels
1231
     *  * If a field is sent to this function that does *not* exist on the page,
1232
     *    it will silently be added to the HTTP request.  This is helpful for testing
1233
     *    some types of forms, but be aware that you will *not* get an exception
1234
     *    like you would if you called `fillField()` or `selectOption()` with
1235
     *    a missing field.
1236
     *
1237
     * Fields that are not provided will be filled by their values from the page,
1238
     * or from any previous calls to `fillField()`, `selectOption()` etc.
1239
     * You don't need to click the 'Submit' button afterwards.
1240
     * This command itself triggers the request to form's action.
1241
     *
1242
     * You can optionally specify which button's value to include
1243
     * in the request with the last parameter (as an alternative to
1244
     * explicitly setting its value in the second parameter), as
1245
     * button values are not otherwise included in the request.
1246
     *
1247
     * Examples:
1248
     *
1249
     * ``` php
1250
     * <?php
1251
     * $I->submitForm('#login', [
1252
     *     'login' => 'davert',
1253
     *     'password' => '123456'
1254
     * ]);
1255
     * // or
1256
     * $I->submitForm('#login', [
1257
     *     'login' => 'davert',
1258
     *     'password' => '123456'
1259
     * ], 'submitButtonName');
1260
     *
1261
     * ```
1262
     *
1263
     * For example, given this sample "Sign Up" form:
1264
     *
1265
     * ``` html
1266
     * <form action="/sign_up">
1267
     *     Login:
1268
     *     <input type="text" name="user[login]" /><br/>
1269
     *     Password:
1270
     *     <input type="password" name="user[password]" /><br/>
1271
     *     Do you agree to our terms?
1272
     *     <input type="checkbox" name="user[agree]" /><br/>
1273
     *     Select pricing plan:
1274
     *     <select name="plan">
1275
     *         <option value="1">Free</option>
1276
     *         <option value="2" selected="selected">Paid</option>
1277
     *     </select>
1278
     *     <input type="submit" name="submitButton" value="Submit" />
1279
     * </form>
1280
     * ```
1281
     *
1282
     * You could write the following to submit it:
1283
     *
1284
     * ``` php
1285
     * <?php
1286
     * $I->submitForm(
1287
     *     '#userForm',
1288
     *     [
1289
     *         'user' => [
1290
     *             'login' => 'Davert',
1291
     *             'password' => '123456',
1292
     *             'agree' => true
1293
     *         ]
1294
     *     ],
1295
     *     'submitButton'
1296
     * );
1297
     * ```
1298
     * Note that "2" will be the submitted value for the "plan" field, as it is
1299
     * the selected option.
1300
     *
1301
     * You can also emulate a JavaScript submission by not specifying any
1302
     * buttons in the third parameter to submitForm.
1303
     *
1304
     * ```php
1305
     * <?php
1306
     * $I->submitForm(
1307
     *     '#userForm',
1308
     *     [
1309
     *         'user' => [
1310
     *             'login' => 'Davert',
1311
     *             'password' => '123456',
1312
     *             'agree' => true
1313
     *         ]
1314
     *     ]
1315
     * );
1316
     * ```
1317
     *
1318
     * This function works well when paired with `seeInFormFields()`
1319
     * for quickly testing CRUD interfaces and form validation logic.
1320
     *
1321
     * ``` php
1322
     * <?php
1323
     * $form = [
1324
     *      'field1' => 'value',
1325
     *      'field2' => 'another value',
1326
     *      'checkbox1' => true,
1327
     *      // ...
1328
     * ];
1329
     * $I->submitForm('#my-form', $form, 'submitButton');
1330
     * // $I->amOnPage('/path/to/form-page') may be needed
1331
     * $I->seeInFormFields('#my-form', $form);
1332
     * ```
1333
     *
1334
     * Parameter values can be set to arrays for multiple input fields
1335
     * of the same name, or multi-select combo boxes.  For checkboxes,
1336
     * you can use either the string value or boolean `true`/`false` which will
1337
     * be replaced by the checkbox's value in the DOM.
1338
     *
1339
     * ``` php
1340
     * <?php
1341
     * $I->submitForm('#my-form', [
1342
     *      'field1' => 'value',
1343
     *      'checkbox' => [
1344
     *          'value of first checkbox',
1345
     *          'value of second checkbox',
1346
     *      ],
1347
     *      'otherCheckboxes' => [
1348
     *          true,
1349
     *          false,
1350
     *          false
1351
     *      ],
1352
     *      'multiselect' => [
1353
     *          'first option value',
1354
     *          'second option value'
1355
     *      ]
1356
     * ]);
1357
     * ```
1358
     *
1359
     * Mixing string and boolean values for a checkbox's value is not supported
1360
     * and may produce unexpected results.
1361
     *
1362
     * Field names ending in `[]` must be passed without the trailing square
1363
     * bracket characters, and must contain an array for its value.  This allows
1364
     * submitting multiple values with the same name, consider:
1365
     *
1366
     * ```php
1367
     * <?php
1368
     * // This will NOT work correctly
1369
     * $I->submitForm('#my-form', [
1370
     *     'field[]' => 'value',
1371
     *     'field[]' => 'another value',  // 'field[]' is already a defined key
1372
     * ]);
1373
     * ```
1374
     *
1375
     * The solution is to pass an array value:
1376
     *
1377
     * ```php
1378
     * <?php
1379
     * // This way both values are submitted
1380
     * $I->submitForm('#my-form', [
1381
     *     'field' => [
1382
     *         'value',
1383
     *         'another value',
1384
     *     ]
1385
     * ]);
1386
     * ```
1387
     *
1388
     * @param $selector
1389
     * @param $params
1390
     * @param $button
1391
     * @see \Codeception\Lib\InnerBrowser::submitForm()
1392
     */
1393
    public function submitForm($selector, $params, $button = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $button is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1394
        return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
1395
    }
1396
1397
 
1398
    /**
1399
     * [!] Method is generated. Documentation taken from corresponding module.
1400
     *
1401
     * Fills a text field or textarea with the given string.
1402
     *
1403
     * ``` php
1404
     * <?php
1405
     * $I->fillField("//input[@type='text']", "Hello World!");
1406
     * $I->fillField(['name' => 'email'], '[email protected]');
1407
     * ?>
1408
     * ```
1409
     *
1410
     * @param $field
1411
     * @param $value
1412
     * @see \Codeception\Lib\InnerBrowser::fillField()
1413
     */
1414
    public function fillField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1415
        return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
1416
    }
1417
1418
 
1419
    /**
1420
     * [!] Method is generated. Documentation taken from corresponding module.
1421
     *
1422
     * Selects an option in a select tag or in radio button group.
1423
     *
1424
     * ``` php
1425
     * <?php
1426
     * $I->selectOption('form select[name=account]', 'Premium');
1427
     * $I->selectOption('form input[name=payment]', 'Monthly');
1428
     * $I->selectOption('//form/select[@name=account]', 'Monthly');
1429
     * ?>
1430
     * ```
1431
     *
1432
     * Provide an array for the second argument to select multiple options:
1433
     *
1434
     * ``` php
1435
     * <?php
1436
     * $I->selectOption('Which OS do you use?', array('Windows','Linux'));
1437
     * ?>
1438
     * ```
1439
     *
1440
     * Or provide an associative array for the second argument to specifically define which selection method should be used:
1441
     *
1442
     * ``` php
1443
     * <?php
1444
     * $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows'
1445
     * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows'
1446
     * ?>
1447
     * ```
1448
     *
1449
     * @param $select
1450
     * @param $option
1451
     * @see \Codeception\Lib\InnerBrowser::selectOption()
1452
     */
1453
    public function selectOption($select, $option) {
0 ignored issues
show
Unused Code introduced by
The parameter $select is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $option is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1454
        return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
1455
    }
1456
1457
 
1458
    /**
1459
     * [!] Method is generated. Documentation taken from corresponding module.
1460
     *
1461
     * Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
1462
     *
1463
     * ``` php
1464
     * <?php
1465
     * $I->checkOption('#agree');
1466
     * ?>
1467
     * ```
1468
     *
1469
     * @param $option
1470
     * @see \Codeception\Lib\InnerBrowser::checkOption()
1471
     */
1472
    public function checkOption($option) {
0 ignored issues
show
Unused Code introduced by
The parameter $option is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1473
        return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
1474
    }
1475
1476
 
1477
    /**
1478
     * [!] Method is generated. Documentation taken from corresponding module.
1479
     *
1480
     * Unticks a checkbox.
1481
     *
1482
     * ``` php
1483
     * <?php
1484
     * $I->uncheckOption('#notify');
1485
     * ?>
1486
     * ```
1487
     *
1488
     * @param $option
1489
     * @see \Codeception\Lib\InnerBrowser::uncheckOption()
1490
     */
1491
    public function uncheckOption($option) {
0 ignored issues
show
Unused Code introduced by
The parameter $option is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1492
        return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
1493
    }
1494
1495
 
1496
    /**
1497
     * [!] Method is generated. Documentation taken from corresponding module.
1498
     *
1499
     * Attaches a file relative to the Codeception data directory to the given file upload field.
1500
     *
1501
     * ``` php
1502
     * <?php
1503
     * // file is stored in 'tests/_data/prices.xls'
1504
     * $I->attachFile('input[@type="file"]', 'prices.xls');
1505
     * ?>
1506
     * ```
1507
     *
1508
     * @param $field
1509
     * @param $filename
1510
     * @see \Codeception\Lib\InnerBrowser::attachFile()
1511
     */
1512
    public function attachFile($field, $filename) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $filename is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1513
        return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
1514
    }
1515
1516
 
1517
    /**
1518
     * [!] Method is generated. Documentation taken from corresponding module.
1519
     *
1520
     * If your page triggers an ajax request, you can perform it manually.
1521
     * This action sends a GET ajax request with specified params.
1522
     *
1523
     * See ->sendAjaxPostRequest for examples.
1524
     *
1525
     * @param $uri
1526
     * @param $params
1527
     * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
1528
     */
1529
    public function sendAjaxGetRequest($uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1530
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
1531
    }
1532
1533
 
1534
    /**
1535
     * [!] Method is generated. Documentation taken from corresponding module.
1536
     *
1537
     * If your page triggers an ajax request, you can perform it manually.
1538
     * This action sends a POST ajax request with specified params.
1539
     * Additional params can be passed as array.
1540
     *
1541
     * Example:
1542
     *
1543
     * Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1544
     * We emulate that click by running this ajax request manually.
1545
     *
1546
     * ``` php
1547
     * <?php
1548
     * $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1549
     * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1550
     *
1551
     * ```
1552
     *
1553
     * @param $uri
1554
     * @param $params
1555
     * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
1556
     */
1557
    public function sendAjaxPostRequest($uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1558
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
1559
    }
1560
1561
 
1562
    /**
1563
     * [!] Method is generated. Documentation taken from corresponding module.
1564
     *
1565
     * If your page triggers an ajax request, you can perform it manually.
1566
     * This action sends an ajax request with specified method and params.
1567
     *
1568
     * Example:
1569
     *
1570
     * You need to perform an ajax request specifying the HTTP method.
1571
     *
1572
     * ``` php
1573
     * <?php
1574
     * $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1575
     *
1576
     * ```
1577
     *
1578
     * @param $method
1579
     * @param $uri
1580
     * @param $params
1581
     * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
1582
     */
1583
    public function sendAjaxRequest($method, $uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $method is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $uri is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1584
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
1585
    }
1586
1587
 
1588
    /**
1589
     * [!] Method is generated. Documentation taken from corresponding module.
1590
     *
1591
     * Finds and returns the text contents of the given element.
1592
     * If a fuzzy locator is used, the element is found using CSS, XPath,
1593
     * and by matching the full page source by regular expression.
1594
     *
1595
     * ``` php
1596
     * <?php
1597
     * $heading = $I->grabTextFrom('h1');
1598
     * $heading = $I->grabTextFrom('descendant-or-self::h1');
1599
     * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
1600
     * ?>
1601
     * ```
1602
     *
1603
     * @param $cssOrXPathOrRegex
1604
     *
1605
     * @return mixed
1606
     * @see \Codeception\Lib\InnerBrowser::grabTextFrom()
1607
     */
1608
    public function grabTextFrom($cssOrXPathOrRegex) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXPathOrRegex is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1609
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
1610
    }
1611
1612
 
1613
    /**
1614
     * [!] Method is generated. Documentation taken from corresponding module.
1615
     *
1616
     * Grabs the value of the given attribute value from the given element.
1617
     * Fails if element is not found.
1618
     *
1619
     * ``` php
1620
     * <?php
1621
     * $I->grabAttributeFrom('#tooltip', 'title');
1622
     * ?>
1623
     * ```
1624
     *
1625
     *
1626
     * @param $cssOrXpath
1627
     * @param $attribute
1628
     *
1629
     * @return mixed
1630
     * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
1631
     */
1632
    public function grabAttributeFrom($cssOrXpath, $attribute) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXpath is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attribute is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1633
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
1634
    }
1635
1636
 
1637
    /**
1638
     * [!] Method is generated. Documentation taken from corresponding module.
1639
     *
1640
     * Grabs either the text content, or attribute values, of nodes
1641
     * matched by $cssOrXpath and returns them as an array.
1642
     *
1643
     * ```html
1644
     * <a href="#first">First</a>
1645
     * <a href="#second">Second</a>
1646
     * <a href="#third">Third</a>
1647
     * ```
1648
     *
1649
     * ```php
1650
     * <?php
1651
     * // would return ['First', 'Second', 'Third']
1652
     * $aLinkText = $I->grabMultiple('a');
1653
     *
1654
     * // would return ['#first', '#second', '#third']
1655
     * $aLinks = $I->grabMultiple('a', 'href');
1656
     * ?>
1657
     * ```
1658
     *
1659
     * @param $cssOrXpath
1660
     * @param $attribute
1661
     * @return string[]
1662
     * @see \Codeception\Lib\InnerBrowser::grabMultiple()
1663
     */
1664
    public function grabMultiple($cssOrXpath, $attribute = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXpath is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attribute is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1665
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args()));
1666
    }
1667
1668
 
1669
    /**
1670
     * [!] Method is generated. Documentation taken from corresponding module.
1671
     *
1672
     * @param $field
1673
     *
1674
     * @return array|mixed|null|string
1675
     * @see \Codeception\Lib\InnerBrowser::grabValueFrom()
1676
     */
1677
    public function grabValueFrom($field) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1678
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
1679
    }
1680
1681
 
1682
    /**
1683
     * [!] Method is generated. Documentation taken from corresponding module.
1684
     *
1685
     * Sets a cookie with the given name and value.
1686
     * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument.
1687
     *
1688
     * ``` php
1689
     * <?php
1690
     * $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
1691
     * ?>
1692
     * ```
1693
     *
1694
     * @param $name
1695
     * @param $val
1696
     * @param array $params
1697
     *
1698
     * @return mixed
1699
     * @see \Codeception\Lib\InnerBrowser::setCookie()
1700
     */
1701
    public function setCookie($name, $val, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $val is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1702
        return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
1703
    }
1704
1705
 
1706
    /**
1707
     * [!] Method is generated. Documentation taken from corresponding module.
1708
     *
1709
     * Grabs a cookie value.
1710
     * You can set additional cookie params like `domain`, `path` in array passed as last argument.
1711
     *
1712
     * @param $cookie
1713
     *
1714
     * @param array $params
1715
     * @return mixed
1716
     * @see \Codeception\Lib\InnerBrowser::grabCookie()
1717
     */
1718
    public function grabCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1719
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
1720
    }
1721
1722
 
1723
    /**
1724
     * [!] Method is generated. Documentation taken from corresponding module.
1725
     *
1726
     * Checks that a cookie with the given name is set.
1727
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1728
     *
1729
     * ``` php
1730
     * <?php
1731
     * $I->seeCookie('PHPSESSID');
1732
     * ?>
1733
     * ```
1734
     *
1735
     * @param $cookie
1736
     * @param array $params
1737
     * @return mixed
1738
     * Conditional Assertion: Test won't be stopped on fail
1739
     * @see \Codeception\Lib\InnerBrowser::seeCookie()
1740
     */
1741
    public function canSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1742
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
1743
    }
1744
    /**
1745
     * [!] Method is generated. Documentation taken from corresponding module.
1746
     *
1747
     * Checks that a cookie with the given name is set.
1748
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1749
     *
1750
     * ``` php
1751
     * <?php
1752
     * $I->seeCookie('PHPSESSID');
1753
     * ?>
1754
     * ```
1755
     *
1756
     * @param $cookie
1757
     * @param array $params
1758
     * @return mixed
1759
     * @see \Codeception\Lib\InnerBrowser::seeCookie()
1760
     */
1761
    public function seeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1762
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
1763
    }
1764
1765
 
1766
    /**
1767
     * [!] Method is generated. Documentation taken from corresponding module.
1768
     *
1769
     * Checks that there isn't a cookie with the given name.
1770
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1771
     *
1772
     * @param $cookie
1773
     *
1774
     * @param array $params
1775
     * @return mixed
1776
     * Conditional Assertion: Test won't be stopped on fail
1777
     * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
1778
     */
1779
    public function cantSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1780
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
1781
    }
1782
    /**
1783
     * [!] Method is generated. Documentation taken from corresponding module.
1784
     *
1785
     * Checks that there isn't a cookie with the given name.
1786
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1787
     *
1788
     * @param $cookie
1789
     *
1790
     * @param array $params
1791
     * @return mixed
1792
     * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
1793
     */
1794
    public function dontSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1795
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
1796
    }
1797
1798
 
1799
    /**
1800
     * [!] Method is generated. Documentation taken from corresponding module.
1801
     *
1802
     * Unsets cookie with the given name.
1803
     * You can set additional cookie params like `domain`, `path` in array passed as last argument.
1804
     *
1805
     * @param $cookie
1806
     *
1807
     * @param array $params
1808
     * @return mixed
1809
     * @see \Codeception\Lib\InnerBrowser::resetCookie()
1810
     */
1811
    public function resetCookie($name, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1812
        return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
1813
    }
1814
1815
 
1816
    /**
1817
     * [!] Method is generated. Documentation taken from corresponding module.
1818
     *
1819
     * Checks that the given element exists on the page and is visible.
1820
     * You can also specify expected attributes of this element.
1821
     *
1822
     * ``` php
1823
     * <?php
1824
     * $I->seeElement('.error');
1825
     * $I->seeElement('//form/input[1]');
1826
     * $I->seeElement('input', ['name' => 'login']);
1827
     * $I->seeElement('input', ['value' => '123456']);
1828
     *
1829
     * // strict locator in first arg, attributes in second
1830
     * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
1831
     * ?>
1832
     * ```
1833
     *
1834
     * @param $selector
1835
     * @param array $attributes
1836
     * @return
1837
     * Conditional Assertion: Test won't be stopped on fail
1838
     * @see \Codeception\Lib\InnerBrowser::seeElement()
1839
     */
1840
    public function canSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1841
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
1842
    }
1843
    /**
1844
     * [!] Method is generated. Documentation taken from corresponding module.
1845
     *
1846
     * Checks that the given element exists on the page and is visible.
1847
     * You can also specify expected attributes of this element.
1848
     *
1849
     * ``` php
1850
     * <?php
1851
     * $I->seeElement('.error');
1852
     * $I->seeElement('//form/input[1]');
1853
     * $I->seeElement('input', ['name' => 'login']);
1854
     * $I->seeElement('input', ['value' => '123456']);
1855
     *
1856
     * // strict locator in first arg, attributes in second
1857
     * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
1858
     * ?>
1859
     * ```
1860
     *
1861
     * @param $selector
1862
     * @param array $attributes
1863
     * @return
1864
     * @see \Codeception\Lib\InnerBrowser::seeElement()
1865
     */
1866
    public function seeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1867
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
1868
    }
1869
1870
 
1871
    /**
1872
     * [!] Method is generated. Documentation taken from corresponding module.
1873
     *
1874
     * Checks that the given element is invisible or not present on the page.
1875
     * You can also specify expected attributes of this element.
1876
     *
1877
     * ``` php
1878
     * <?php
1879
     * $I->dontSeeElement('.error');
1880
     * $I->dontSeeElement('//form/input[1]');
1881
     * $I->dontSeeElement('input', ['name' => 'login']);
1882
     * $I->dontSeeElement('input', ['value' => '123456']);
1883
     * ?>
1884
     * ```
1885
     *
1886
     * @param $selector
1887
     * @param array $attributes
1888
     * Conditional Assertion: Test won't be stopped on fail
1889
     * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
1890
     */
1891
    public function cantSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1892
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
1893
    }
1894
    /**
1895
     * [!] Method is generated. Documentation taken from corresponding module.
1896
     *
1897
     * Checks that the given element is invisible or not present on the page.
1898
     * You can also specify expected attributes of this element.
1899
     *
1900
     * ``` php
1901
     * <?php
1902
     * $I->dontSeeElement('.error');
1903
     * $I->dontSeeElement('//form/input[1]');
1904
     * $I->dontSeeElement('input', ['name' => 'login']);
1905
     * $I->dontSeeElement('input', ['value' => '123456']);
1906
     * ?>
1907
     * ```
1908
     *
1909
     * @param $selector
1910
     * @param array $attributes
1911
     * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
1912
     */
1913
    public function dontSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1914
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
1915
    }
1916
1917
 
1918
    /**
1919
     * [!] Method is generated. Documentation taken from corresponding module.
1920
     *
1921
     * Checks that there are a certain number of elements matched by the given locator on the page.
1922
     *
1923
     * ``` php
1924
     * <?php
1925
     * $I->seeNumberOfElements('tr', 10);
1926
     * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
1927
     * ?>
1928
     * ```
1929
     * @param $selector
1930
     * @param mixed $expected :
1931
     * - string: strict number
1932
     * - array: range of numbers [0,10]
1933
     * Conditional Assertion: Test won't be stopped on fail
1934
     * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
1935
     */
1936
    public function canSeeNumberOfElements($selector, $expected) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $expected is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1937
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
1938
    }
1939
    /**
1940
     * [!] Method is generated. Documentation taken from corresponding module.
1941
     *
1942
     * Checks that there are a certain number of elements matched by the given locator on the page.
1943
     *
1944
     * ``` php
1945
     * <?php
1946
     * $I->seeNumberOfElements('tr', 10);
1947
     * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
1948
     * ?>
1949
     * ```
1950
     * @param $selector
1951
     * @param mixed $expected :
1952
     * - string: strict number
1953
     * - array: range of numbers [0,10]
1954
     * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
1955
     */
1956
    public function seeNumberOfElements($selector, $expected) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $expected is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1957
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
1958
    }
1959
1960
 
1961
    /**
1962
     * [!] Method is generated. Documentation taken from corresponding module.
1963
     *
1964
     * Checks that the given option is selected.
1965
     *
1966
     * ``` php
1967
     * <?php
1968
     * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
1969
     * ?>
1970
     * ```
1971
     *
1972
     * @param $selector
1973
     * @param $optionText
1974
     *
1975
     * @return mixed
1976
     * Conditional Assertion: Test won't be stopped on fail
1977
     * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
1978
     */
1979
    public function canSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1980
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
1981
    }
1982
    /**
1983
     * [!] Method is generated. Documentation taken from corresponding module.
1984
     *
1985
     * Checks that the given option is selected.
1986
     *
1987
     * ``` php
1988
     * <?php
1989
     * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
1990
     * ?>
1991
     * ```
1992
     *
1993
     * @param $selector
1994
     * @param $optionText
1995
     *
1996
     * @return mixed
1997
     * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
1998
     */
1999
    public function seeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2000
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
2001
    }
2002
2003
 
2004
    /**
2005
     * [!] Method is generated. Documentation taken from corresponding module.
2006
     *
2007
     * Checks that the given option is not selected.
2008
     *
2009
     * ``` php
2010
     * <?php
2011
     * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
2012
     * ?>
2013
     * ```
2014
     *
2015
     * @param $selector
2016
     * @param $optionText
2017
     *
2018
     * @return mixed
2019
     * Conditional Assertion: Test won't be stopped on fail
2020
     * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
2021
     */
2022
    public function cantSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2023
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
2024
    }
2025
    /**
2026
     * [!] Method is generated. Documentation taken from corresponding module.
2027
     *
2028
     * Checks that the given option is not selected.
2029
     *
2030
     * ``` php
2031
     * <?php
2032
     * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
2033
     * ?>
2034
     * ```
2035
     *
2036
     * @param $selector
2037
     * @param $optionText
2038
     *
2039
     * @return mixed
2040
     * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
2041
     */
2042
    public function dontSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2043
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
2044
    }
2045
2046
 
2047
    /**
2048
     * [!] Method is generated. Documentation taken from corresponding module.
2049
     *
2050
     * Asserts that current page has 404 response status code.
2051
     * Conditional Assertion: Test won't be stopped on fail
2052
     * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
2053
     */
2054
    public function canSeePageNotFound() {
2055
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
2056
    }
2057
    /**
2058
     * [!] Method is generated. Documentation taken from corresponding module.
2059
     *
2060
     * Asserts that current page has 404 response status code.
2061
     * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
2062
     */
2063
    public function seePageNotFound() {
2064
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
2065
    }
2066
2067
 
2068
    /**
2069
     * [!] Method is generated. Documentation taken from corresponding module.
2070
     *
2071
     * Checks that response code is equal to value provided.
2072
     *
2073
     * ```php
2074
     * <?php
2075
     * $I->seeResponseCodeIs(200);
2076
     *
2077
     * // recommended \Codeception\Util\HttpCode
2078
     * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2079
     * ```
2080
     *
2081
     * @param $code
2082
     * Conditional Assertion: Test won't be stopped on fail
2083
     * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
2084
     */
2085
    public function canSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2086
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
2087
    }
2088
    /**
2089
     * [!] Method is generated. Documentation taken from corresponding module.
2090
     *
2091
     * Checks that response code is equal to value provided.
2092
     *
2093
     * ```php
2094
     * <?php
2095
     * $I->seeResponseCodeIs(200);
2096
     *
2097
     * // recommended \Codeception\Util\HttpCode
2098
     * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2099
     * ```
2100
     *
2101
     * @param $code
2102
     * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
2103
     */
2104
    public function seeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2105
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
2106
    }
2107
2108
 
2109
    /**
2110
     * [!] Method is generated. Documentation taken from corresponding module.
2111
     *
2112
     * Checks that response code is equal to value provided.
2113
     *
2114
     * ```php
2115
     * <?php
2116
     * $I->dontSeeResponseCodeIs(200);
2117
     *
2118
     * // recommended \Codeception\Util\HttpCode
2119
     * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2120
     * ```
2121
     * @param $code
2122
     * Conditional Assertion: Test won't be stopped on fail
2123
     * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
2124
     */
2125
    public function cantSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2126
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args()));
2127
    }
2128
    /**
2129
     * [!] Method is generated. Documentation taken from corresponding module.
2130
     *
2131
     * Checks that response code is equal to value provided.
2132
     *
2133
     * ```php
2134
     * <?php
2135
     * $I->dontSeeResponseCodeIs(200);
2136
     *
2137
     * // recommended \Codeception\Util\HttpCode
2138
     * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2139
     * ```
2140
     * @param $code
2141
     * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
2142
     */
2143
    public function dontSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2144
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeResponseCodeIs', func_get_args()));
2145
    }
2146
2147
 
2148
    /**
2149
     * [!] Method is generated. Documentation taken from corresponding module.
2150
     *
2151
     * Checks that the page title contains the given string.
2152
     *
2153
     * ``` php
2154
     * <?php
2155
     * $I->seeInTitle('Blog - Post #1');
2156
     * ?>
2157
     * ```
2158
     *
2159
     * @param $title
2160
     *
2161
     * @return mixed
2162
     * Conditional Assertion: Test won't be stopped on fail
2163
     * @see \Codeception\Lib\InnerBrowser::seeInTitle()
2164
     */
2165
    public function canSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2166
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
2167
    }
2168
    /**
2169
     * [!] Method is generated. Documentation taken from corresponding module.
2170
     *
2171
     * Checks that the page title contains the given string.
2172
     *
2173
     * ``` php
2174
     * <?php
2175
     * $I->seeInTitle('Blog - Post #1');
2176
     * ?>
2177
     * ```
2178
     *
2179
     * @param $title
2180
     *
2181
     * @return mixed
2182
     * @see \Codeception\Lib\InnerBrowser::seeInTitle()
2183
     */
2184
    public function seeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2185
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
2186
    }
2187
2188
 
2189
    /**
2190
     * [!] Method is generated. Documentation taken from corresponding module.
2191
     *
2192
     * Checks that the page title does not contain the given string.
2193
     *
2194
     * @param $title
2195
     *
2196
     * @return mixed
2197
     * Conditional Assertion: Test won't be stopped on fail
2198
     * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
2199
     */
2200
    public function cantSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2201
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
2202
    }
2203
    /**
2204
     * [!] Method is generated. Documentation taken from corresponding module.
2205
     *
2206
     * Checks that the page title does not contain the given string.
2207
     *
2208
     * @param $title
2209
     *
2210
     * @return mixed
2211
     * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
2212
     */
2213
    public function dontSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2214
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
2215
    }
2216
2217
 
2218
    /**
2219
     * [!] Method is generated. Documentation taken from corresponding module.
2220
     *
2221
     * Switch to iframe or frame on the page.
2222
     *
2223
     * Example:
2224
     * ``` html
2225
     * <iframe name="another_frame" src="http://example.com">
2226
     * ```
2227
     *
2228
     * ``` php
2229
     * <?php
2230
     * # switch to iframe
2231
     * $I->switchToIframe("another_frame");
2232
     * ```
2233
     *
2234
     * @param string $name
2235
     * @see \Codeception\Lib\InnerBrowser::switchToIframe()
2236
     */
2237
    public function switchToIframe($name) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2238
        return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args()));
2239
    }
2240
2241
 
2242
    /**
2243
     * [!] Method is generated. Documentation taken from corresponding module.
2244
     *
2245
     * Moves back in history.
2246
     *
2247
     * @param int $numberOfSteps (default value 1)
2248
     * @see \Codeception\Lib\InnerBrowser::moveBack()
2249
     */
2250
    public function moveBack($numberOfSteps = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $numberOfSteps is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2251
        return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
2252
    }
2253
2254
 
2255
    /**
2256
     * [!] Method is generated. Documentation taken from corresponding module.
2257
     *
2258
     * Inserts an SQL record into a database. This record will be erased after the test.
2259
     *
2260
     * ```php
2261
     * <?php
2262
     * $I->haveInDatabase('users', array('name' => 'miles', 'email' => '[email protected]'));
2263
     * ?>
2264
     * ```
2265
     *
2266
     * @param string $table
2267
     * @param array $data
2268
     *
2269
     * @return integer $id
2270
     * @see \Codeception\Module\Db::haveInDatabase()
2271
     */
2272
    public function haveInDatabase($table, $data) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $data is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2273
        return $this->getScenario()->runStep(new \Codeception\Step\Action('haveInDatabase', func_get_args()));
2274
    }
2275
2276
 
2277
    /**
2278
     * [!] Method is generated. Documentation taken from corresponding module.
2279
     *
2280
     * Asserts that a row with the given column values exists.
2281
     * Provide table name and column values.
2282
     *
2283
     * ``` php
2284
     * <?php
2285
     * $I->seeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]'));
2286
     * ```
2287
     * Fails if no such user found.
2288
     *
2289
     * @param string $table
2290
     * @param array $criteria
2291
     * Conditional Assertion: Test won't be stopped on fail
2292
     * @see \Codeception\Module\Db::seeInDatabase()
2293
     */
2294
    public function canSeeInDatabase($table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2295
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInDatabase', func_get_args()));
2296
    }
2297
    /**
2298
     * [!] Method is generated. Documentation taken from corresponding module.
2299
     *
2300
     * Asserts that a row with the given column values exists.
2301
     * Provide table name and column values.
2302
     *
2303
     * ``` php
2304
     * <?php
2305
     * $I->seeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]'));
2306
     * ```
2307
     * Fails if no such user found.
2308
     *
2309
     * @param string $table
2310
     * @param array $criteria
2311
     * @see \Codeception\Module\Db::seeInDatabase()
2312
     */
2313
    public function seeInDatabase($table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2314
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInDatabase', func_get_args()));
2315
    }
2316
2317
 
2318
    /**
2319
     * [!] Method is generated. Documentation taken from corresponding module.
2320
     *
2321
     * Asserts that the given number of records were found in the database.
2322
     *
2323
     * ```php
2324
     * <?php
2325
     * $I->seeNumRecords(1, 'users', ['name' => 'davert'])
2326
     * ?>
2327
     * ```
2328
     *
2329
     * @param int $expectedNumber Expected number
2330
     * @param string $table Table name
2331
     * @param array $criteria Search criteria [Optional]
2332
     * Conditional Assertion: Test won't be stopped on fail
2333
     * @see \Codeception\Module\Db::seeNumRecords()
2334
     */
2335
    public function canSeeNumRecords($expectedNumber, $table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $expectedNumber is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2336
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumRecords', func_get_args()));
2337
    }
2338
    /**
2339
     * [!] Method is generated. Documentation taken from corresponding module.
2340
     *
2341
     * Asserts that the given number of records were found in the database.
2342
     *
2343
     * ```php
2344
     * <?php
2345
     * $I->seeNumRecords(1, 'users', ['name' => 'davert'])
2346
     * ?>
2347
     * ```
2348
     *
2349
     * @param int $expectedNumber Expected number
2350
     * @param string $table Table name
2351
     * @param array $criteria Search criteria [Optional]
2352
     * @see \Codeception\Module\Db::seeNumRecords()
2353
     */
2354
    public function seeNumRecords($expectedNumber, $table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $expectedNumber is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2355
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumRecords', func_get_args()));
2356
    }
2357
2358
 
2359
    /**
2360
     * [!] Method is generated. Documentation taken from corresponding module.
2361
     *
2362
     * Effect is opposite to ->seeInDatabase
2363
     *
2364
     * Asserts that there is no record with the given column values in a database.
2365
     * Provide table name and column values.
2366
     *
2367
     * ``` php
2368
     * <?php
2369
     * $I->dontSeeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]'));
2370
     * ```
2371
     * Fails if such user was found.
2372
     *
2373
     * @param string $table
2374
     * @param array $criteria
2375
     * Conditional Assertion: Test won't be stopped on fail
2376
     * @see \Codeception\Module\Db::dontSeeInDatabase()
2377
     */
2378
    public function cantSeeInDatabase($table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2379
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInDatabase', func_get_args()));
2380
    }
2381
    /**
2382
     * [!] Method is generated. Documentation taken from corresponding module.
2383
     *
2384
     * Effect is opposite to ->seeInDatabase
2385
     *
2386
     * Asserts that there is no record with the given column values in a database.
2387
     * Provide table name and column values.
2388
     *
2389
     * ``` php
2390
     * <?php
2391
     * $I->dontSeeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]'));
2392
     * ```
2393
     * Fails if such user was found.
2394
     *
2395
     * @param string $table
2396
     * @param array $criteria
2397
     * @see \Codeception\Module\Db::dontSeeInDatabase()
2398
     */
2399
    public function dontSeeInDatabase($table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2400
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInDatabase', func_get_args()));
2401
    }
2402
2403
 
2404
    /**
2405
     * [!] Method is generated. Documentation taken from corresponding module.
2406
     *
2407
     * Fetches a single column value from a database.
2408
     * Provide table name, desired column and criteria.
2409
     *
2410
     * ``` php
2411
     * <?php
2412
     * $mail = $I->grabFromDatabase('users', 'email', array('name' => 'Davert'));
2413
     * ```
2414
     *
2415
     * @param string $table
2416
     * @param string $column
2417
     * @param array $criteria
2418
     *
2419
     * @return mixed
2420
     * @see \Codeception\Module\Db::grabFromDatabase()
2421
     */
2422
    public function grabFromDatabase($table, $column, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $column is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2423
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromDatabase', func_get_args()));
2424
    }
2425
2426
 
2427
    /**
2428
     * [!] Method is generated. Documentation taken from corresponding module.
2429
     *
2430
     * Returns the number of rows in a database
2431
     *
2432
     * @param string $table    Table name
2433
     * @param array  $criteria Search criteria [Optional]
2434
     *
2435
     * @return int
2436
     * @see \Codeception\Module\Db::grabNumRecords()
2437
     */
2438
    public function grabNumRecords($table, $criteria = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
2439
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabNumRecords', func_get_args()));
2440
    }
2441
}
2442