| @@ 906-918 (lines=13) @@ | ||
| 903 | * |
|
| 904 | * @Given /^I wait for (\d+) seconds until I see the "([^"]*)" element$/ |
|
| 905 | **/ |
|
| 906 | public function iWaitXUntilISee($wait, $selector) |
|
| 907 | { |
|
| 908 | $page = $this->getSession()->getPage(); |
|
| 909 | ||
| 910 | $this->spin(function ($page) use ($page, $selector) { |
|
| 911 | $element = $page->find('css', $selector); |
|
| 912 | ||
| 913 | if (empty($element)) { |
|
| 914 | return false; |
|
| 915 | } else { |
|
| 916 | return $element->isVisible(); |
|
| 917 | } |
|
| 918 | }); |
|
| 919 | } |
|
| 920 | ||
| 921 | /** |
|
| @@ 929-939 (lines=11) @@ | ||
| 926 | * |
|
| 927 | * @Given /^I wait until I see the "([^"]*)" element$/ |
|
| 928 | */ |
|
| 929 | public function iWaitUntilISee($selector) |
|
| 930 | { |
|
| 931 | $page = $this->getSession()->getPage(); |
|
| 932 | $this->spin(function ($page) use ($page, $selector) { |
|
| 933 | $element = $page->find('css', $selector); |
|
| 934 | if (empty($element)) { |
|
| 935 | return false; |
|
| 936 | } else { |
|
| 937 | return ($element->isVisible()); |
|
| 938 | } |
|
| 939 | }); |
|
| 940 | } |
|
| 941 | ||
| 942 | /** |
|