| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function assert() |
||
| 14 | { |
||
| 15 | $exceptionThrown = false; |
||
| 16 | try { |
||
| 17 | $this->getTestCase()->assertWebDriverElement($this->webDriver->{$this->by}($this->selector)); |
||
| 18 | } catch (\Exception $e) { |
||
| 19 | $exceptionThrown = true; |
||
| 20 | AbstractTestCase::assertTrue(true); // protection against " test did not perform any assertions" |
||
| 21 | } |
||
| 22 | if (!$exceptionThrown) { |
||
| 23 | $this->getTestCase()->fail(sprintf('Element "%s" was found using selector "%s"', $this->selector, $this->by)); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 28 |