1: <?php
2: namespace Azalea\Selenium\EHR\UI;
3:
4: class LockScreen extends \Azalea\Selenium\Core\View
5: {
6: protected static $CONTAINER_ID = "timeout_haze_screen";
7: protected static $FORM_ID = "timeout_haze_form";
8: protected static $PASSWORD_FIELD = "timeout_password";
9: protected static $FORM_SUBMIT_BUTTON = "timeout_password_submit";
10: protected static $BAD_PASSWORD_MESSAGE = "The password that you entered is invalid. Please try again.";
11: protected static $BAD_PASSWORD_MESSAGE_ID = "error_message";
12:
13: 14: 15: 16:
17: public function isVisible()
18: {
19: return $this->displayedById(self::$CONTAINER_ID, self::$FORM_ID);
20: }
21:
22: 23: 24: 25:
26: public function isBadPassword()
27: {
28: return $this->isTextPresent(self::$BAD_PASSWORD_MESSAGE, $this->byId(self::$BAD_PASSWORD_MESSAGE_ID));
29: }
30:
31: 32: 33: 34: 35:
36: public function resumeSession($password)
37: {
38: $this->byName(self::$PASSWORD_FIELD)->value($password);
39: $this->clickAndWait($this->byName(self::$FORM_SUBMIT_BUTTON));
40: }
41:
42: 43: 44: 45:
46: public function verify($args = array())
47: {
48: return $this->isVisible();
49: }
50: }
51: ?>