1 | <?php |
||
7 | trait WaitsForElements |
||
8 | { |
||
9 | /** {@inheritdoc} */ |
||
10 | public function whenAvailable($selector, Closure $callback, $seconds = null) |
||
16 | |||
17 | /** {@inheritdoc} */ |
||
18 | public function waitFor($selector, $seconds = null) |
||
24 | |||
25 | /** {@inheritdoc} */ |
||
26 | public function waitUntilMissing($selector, $seconds = null) |
||
32 | |||
33 | /** {@inheritdoc} */ |
||
34 | public function waitForText($text, $seconds = null) |
||
40 | |||
41 | /** {@inheritdoc} */ |
||
42 | public function waitForLink($link, $seconds = null) |
||
48 | |||
49 | /** {@inheritdoc} */ |
||
50 | public function waitForLocation($path, $seconds = null) |
||
56 | |||
57 | /** {@inheritdoc} */ |
||
58 | public function waitForRoute($route, $parameters = [], $seconds = null) |
||
64 | |||
65 | /** {@inheritdoc} */ |
||
66 | public function waitUntil($script, $seconds = null, $message = null) |
||
72 | |||
73 | /** {@inheritdoc} */ |
||
74 | public function waitForDialog($seconds = null) |
||
80 | |||
81 | /** {@inheritdoc} */ |
||
82 | public function waitForReload($callback = null, $seconds = null) |
||
88 | |||
89 | /** {@inheritdoc} */ |
||
90 | public function waitUsing($seconds, $interval, Closure $callback, $message = null) |
||
96 | } |
||
97 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: