| Conditions | 3 |
| Paths | 10 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function execute($remember = false) |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | $element = $this->webDriver->byXpath($this->theme->getUsernameXpath()); |
||
| 33 | $element->clear(); |
||
| 34 | $element->sendKeys($this->identity->getUsername()); |
||
| 35 | |||
| 36 | $element = $this->webDriver->byXpath($this->theme->getPasswordXpath()); |
||
| 37 | $element->clear(); |
||
| 38 | $element->sendKeys($this->identity->getPassword()); |
||
| 39 | |||
| 40 | if ($remember) { |
||
| 41 | $element = $this->webDriver->byXpath($this->theme->getRememberXpath()); |
||
| 42 | $element->click(); |
||
| 43 | } |
||
| 44 | |||
| 45 | } catch (NoSuchElementException $e) { |
||
| 46 | // Presuming that we're logged in |
||
| 47 | } |
||
| 48 | $element = $this->webDriver->byXpath($this->theme->getSignInXpath()); |
||
| 49 | $element->click(); |
||
| 50 | } |
||
| 51 | |||
| 52 | } |