@@ -70,15 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | if(isset($element)) { |
72 | 72 | $text = $element->getValue(); |
73 | - } |
|
74 | - else { |
|
73 | + } else { |
|
75 | 74 | throw new \Exception(sprintf("Element is null")); |
76 | 75 | } |
77 | 76 | |
78 | 77 | if($text === $value) { |
79 | 78 | return true; |
80 | - } |
|
81 | - else { |
|
79 | + } else { |
|
82 | 80 | throw new \Exception(sprintf('Value of input : "%s" does not match the text "%s"', $text, $value)); |
83 | 81 | } |
84 | 82 | } |
@@ -92,8 +90,7 @@ discard block |
||
92 | 90 | $this->iShouldSeeInTheSourceOfThePage($text); |
93 | 91 | $isTextFound = true; |
94 | 92 | break; |
95 | - } |
|
96 | - catch (\Exception $e) { |
|
93 | + } catch (\Exception $e) { |
|
97 | 94 | sleep(1); |
98 | 95 | } |
99 | 96 | } |