@@ 128-139 (lines=12) @@ | ||
125 | return $text; |
|
126 | } |
|
127 | ||
128 | public function iClickOnTheTextInRegion($text, $region) { |
|
129 | ||
130 | $session = $this->getSession(); |
|
131 | $element = $session->getPage()->find('region', $region)->find('xpath', $session->getSelectorsHandler()->selectorToXpath('xpath', |
|
132 | '//*[contains(text(),"' . $text . '")]')); |
|
133 | if (null === $element) { |
|
134 | throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text)); |
|
135 | } |
|
136 | ||
137 | $element->click(); |
|
138 | } |
|
139 | ||
140 | public function selectOptionWithJavascript($text, $region) { |
|
141 | ||
142 | $session = $this->getSession(); |
|
@@ 140-151 (lines=12) @@ | ||
137 | $element->click(); |
|
138 | } |
|
139 | ||
140 | public function selectOptionWithJavascript($text, $region) { |
|
141 | ||
142 | $session = $this->getSession(); |
|
143 | $element = $session->getPage()->find('region', $region)->find('xpath', $session->getSelectorsHandler()->selectorToXpath('xpath', |
|
144 | '//*[contains(text(),"' . $text . '")]')); |
|
145 | ||
146 | if (null === $element) { |
|
147 | throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text)); |
|
148 | } |
|
149 | ||
150 | $element->click(); |
|
151 | } |
|
152 | ||
153 | public function assertSelectRadioById($label, $id = '') { |
|
154 | $element = $this->getSession()->getPage(); |