1: <?php
2: namespace Azalea\Selenium\EHR\UI\Settings\General\Users;
3:
4: class UserRow extends \Azalea\Selenium\EHR\UI\GridRow
5: {
6:
7: protected static $selector = "#users_details";
8: protected static $title = "";
9: protected static $title_selector = "";
10:
11: 12: 13: 14:
15: public function verify($args = array())
16: {
17: $this->byCss(static::$selector . " td.admin");
18: $this->byCss(static::$selector . " td.email");
19: $this->byCss(static::$selector . " td.usr_lname");
20: $this->byCss(static::$selector . " td.usr_title");
21: $this->byCss(static::$selector . " td.usr_email");
22: $this->byCss(static::$selector . " td.usr_last_login");
23: $this->byCss(static::$selector . " td.usr_disabled");
24: return true;
25: }
26:
27: public function clickRow($delay = 2)
28: {
29: parent::clickRow($delay);
30: return new UserDetails($this);
31: }
32:
33: public function isAdmin()
34: {
35: return $this->byCss(static::$selector . " td.admin span")->attribute("title") == "User is an Admin";
36: }
37:
38: public function getName()
39: {
40: return $this->byCss(static::$selector . " td.usr_lname span")->text();
41: }
42:
43: public function getTitle()
44: {
45: return $this->byCss(static::$selector . " td.user_email")->text();
46: }
47:
48: public function getLastLogin()
49: {
50: return trim($this->byCss(static::$selector . " td.usr_last_login")->text());
51: }
52:
53: public function isDisabled()
54: {
55: return $this->byCss(static::$selector . " td.usr_disabled span")->text() != "Active";
56: }
57: }