1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: require_once ('PatientAllergyEditPopup.php');
5:
6: class PatientAllergySearchPopup extends \Azalea\Selenium\EHR\UI\Popup
7: {
8: protected static $selector = "#new_allergy_popup";
9:
10: 11: 12: 13: 14:
15: protected static $SEARCH = '#autoselect_search';
16: protected static $GRID = '#new_allergy_popup .gridHolder';
17: protected static $BUTTON_SELECT = '.popup_buttons > button';
18: protected static $BUTTON_CANCEL = '.popup_buttons > button + button';
19:
20: 21: 22: 23: 24:
25: public function getAllergyNameAtIndex($index=0)
26: {
27: return $this->byCss(self::$GRID.' tr[data-grid-row="'.$index.'"] > .algn_name')->text();
28: }
29:
30: public function selectAllergyAtIndex($index=0)
31: {
32: $this->byCss(self::$GRID.' tr[data-grid-row="'.$index.'"]')->click();
33: }
34:
35: public function clickButtonSelect()
36: {
37: $this->clickAndWait($this->byCss(self::$BUTTON_SELECT), 1);
38: return new PatientAllergyEditPopup($this);
39: }
40:
41: public function clickButtonCancel()
42: {
43: $this->byCss(self::$BUTTON_CANCEL)->click();
44: }
45:
46: public function setTextSearch($text='')
47: {
48: $this->byCss(self::$SEARCH)->value($text);
49: }
50:
51: 52: 53: 54:
55: public function verify($args = array())
56: {
57:
58:
59:
60:
61: return parent::verify($args);
62: }
63: }
64: ?>