1 | <?php |
||
41 | class RawTqContext extends RawPageContext implements TqContextInterface |
||
42 | { |
||
43 | use Debugger; |
||
44 | use Tags; |
||
45 | |||
46 | /** |
||
47 | * Parameters of TqExtension. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | private $parameters = []; |
||
52 | /** |
||
53 | * @var string |
||
54 | */ |
||
55 | protected static $pageUrl = ''; |
||
56 | |||
57 | /** |
||
58 | * @param string $method |
||
59 | * @param array $arguments |
||
60 | * |
||
61 | * @throws \Exception |
||
62 | * @throws ContextNotFoundException |
||
63 | * When context class cannot be loaded. |
||
64 | * |
||
65 | * @return SnippetAcceptingContext |
||
66 | */ |
||
67 | public function __call($method, array $arguments) |
||
89 | |||
90 | /** |
||
91 | * Get selector by name. |
||
92 | * |
||
93 | * @param string $name |
||
94 | * Selector name from the configuration file. |
||
95 | * |
||
96 | * @return string |
||
97 | * CSS selector. |
||
98 | * |
||
99 | * @throws \Exception |
||
100 | * If selector does not exits. |
||
101 | */ |
||
102 | public function getDrupalSelector($name) |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function getDrupalText($name) |
||
121 | |||
122 | /** |
||
123 | * @param string $site |
||
124 | * Drupal site folder. |
||
125 | * |
||
126 | * @return string |
||
127 | * URL to files directory. |
||
128 | */ |
||
129 | public function getFilesUrl($site = 'default') |
||
133 | |||
134 | /** |
||
135 | * @param string $text |
||
136 | * JS code for processing. |
||
137 | * |
||
138 | * @return self |
||
139 | */ |
||
140 | protected function processJavaScript(&$text) |
||
146 | |||
147 | /** |
||
148 | * @return InitializedContextEnvironment |
||
149 | */ |
||
150 | public function getEnvironment() |
||
154 | |||
155 | /** |
||
156 | * @return Selenium2Driver |
||
157 | */ |
||
158 | public function getSessionDriver() |
||
162 | |||
163 | /** |
||
164 | * @return Session |
||
165 | */ |
||
166 | public function getWebDriverSession() |
||
170 | |||
171 | /** |
||
172 | * @todo Remove this when DrupalExtension will be used Mink >=1.6 and use $this->getSession->getWindowNames(); |
||
173 | * |
||
174 | * @return string[] |
||
175 | */ |
||
176 | public function getWindowNames() |
||
180 | |||
181 | /** |
||
182 | * @param NodeElement $element |
||
183 | * @param string $script |
||
184 | * |
||
185 | * @example |
||
186 | * $this->executeJsOnElement($this->element('*', 'Meta tags'), 'return jQuery({{ELEMENT}}).text();'); |
||
187 | * $this->executeJsOnElement($this->element('*', '#menu'), '{{ELEMENT}}.focus();'); |
||
188 | * |
||
189 | * @throws \Exception |
||
190 | * |
||
191 | * @return mixed |
||
192 | */ |
||
193 | public function executeJsOnElement(NodeElement $element, $script) |
||
207 | |||
208 | /** |
||
209 | * @param string $javascript |
||
210 | * JS code for execution. |
||
211 | * @param array $args |
||
212 | * Placeholder declarations. |
||
213 | * |
||
214 | * @return mixed |
||
215 | */ |
||
216 | public function executeJs($javascript, array $args = []) |
||
225 | |||
226 | /** |
||
227 | * Check JS events in step definition. |
||
228 | * |
||
229 | * @param StepScope $event |
||
230 | * |
||
231 | * @return int |
||
232 | */ |
||
233 | public static function isStepImpliesJsEvent(StepScope $event) |
||
237 | |||
238 | /** |
||
239 | * @return DrushDriver |
||
240 | */ |
||
241 | public function getDrushDriver() |
||
245 | |||
246 | /** |
||
247 | * Wait for all AJAX requests and jQuery animations. |
||
248 | */ |
||
249 | public function waitAjaxAndAnimations() |
||
257 | |||
258 | /** |
||
259 | * {@inheritdoc} |
||
260 | */ |
||
261 | public function setTqParameters(array $parameters) |
||
267 | |||
268 | /** |
||
269 | * {@inheritdoc} |
||
270 | */ |
||
271 | public function getTqParameter($name) |
||
275 | |||
276 | /** |
||
277 | * {@inheritdoc} |
||
278 | */ |
||
279 | public function locatePath($path = '') |
||
323 | |||
324 | /** |
||
325 | * @return string |
||
326 | */ |
||
327 | public function getCurrentUrl() |
||
331 | } |
||
332 |