Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 12 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
24 | View Code Duplication | protected function findElement($selector, $locator, $index) |
|
25 | { |
||
26 | $page = $this->getSession()->getPage(); |
||
27 | |||
28 | $nodes = $page->findAll($selector, $locator); |
||
29 | |||
30 | if (!isset($nodes[$index - 1])) { |
||
31 | throw new \Exception("The $index $selector '$locator' was not found anywhere in the page"); |
||
32 | } |
||
33 | |||
34 | return $nodes[$index - 1]; |
||
35 | } |
||
36 | } |
||
37 |