1: <?php
2: namespace Azalea\Selenium\App\Charts;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class ChartProcedureCodes extends View
7: {
8:
9: 10: 11:
12:
13: public function fillQuickSubmit($code, $box = 1)
14: {
15: $this->querySelector(".qs_cp_code".$box." > input")->value($code);
16: return $this;
17: }
18:
19: public function submitQuickSubmit()
20: {
21:
22: $this->clickElement(".cpt_submit");
23: $this->driver->waitForAjax();
24: }
25:
26: public function search()
27: {
28: $this->filter(".pc_quicksubmit")->press("Search");
29: $this->driver->wait(1);
30: return $this;
31: }
32:
33: public function removeAll()
34: {
35: $total = count($this->querySelectorAll('[data-grid-row] .cp_code'));
36: for ($i = $total; $i > 0; $i--) {
37: $this->querySelector('[data-grid-row="0"] [data-button-class="delete"]')->click();
38: $this->spinWait(function ($driver) use ($i) {
39: return (count($driver->querySelectorAll('[data-grid-row] .cp_code')) < $i);
40: });
41: }
42: return $this;
43: }
44: }
45:
46: ?>