1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: 5: 6:
7:
8: class PatientHandouts extends PatientSection
9: {
10:
11: protected static $hash = '/patients/p/{pat_id}/handouts';
12: protected static $selectorSection = '.patients-PatientHandoutsViewView';
13:
14: 15: 16: 17: 18:
19: protected static $HANDOUTS_REFRESH_BUTTON = 'button[data-events="click:onRefresh"]';
20: protected static $HANDOUTS_NEW_HANDOUT_BUTTON = 'button[data-events="click:onNewHandout"]';
21: protected static $HANDOUTS_SEARCH_BAR = '#patient_handouts_container .search';
22: protected static $HANDOUTS_GRID = ".gridHolder";
23:
24: 25: 26: 27: 28:
29: public function clickRefreshButton()
30: {
31: $this->click($this->byCss(self::$HANDOUTS_REFRESH_BUTTON));
32: }
33:
34: public function clickNewHandoutButton()
35: {
36: $this->click($this->byCss(self::$HANDOUTS_NEW_HANDOUT_BUTTON));
37: }
38:
39: public function setTextHandoutsSearch($text='')
40: {
41: $this->byCss(self::$HANDOUTS_SEARCH_BAR)->value($text);
42: }
43:
44: public function getGridNameAtIndex($index=0)
45: {
46: return $this->byCss(self::$HANDOUTS_GRID.' tr[data-grid-row="'.$index.'"] .phs_name')->text();
47: }
48:
49: public function verify($args = array())
50: {
51: if (parent::verify($args)) {
52: $this->byCss($this->getSelectorSection());
53: return true;
54: }
55: return false;
56: }
57: }