File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,16 @@ public function start()
78
78
}
79
79
}
80
80
81
+ public function getRequest ()
82
+ {
83
+ throw new \LogicException ('HttpFoundation Request object is not available when using WebDriver. ' );
84
+ }
85
+
86
+ public function getResponse ()
87
+ {
88
+ throw new \LogicException ('HttpFoundation Response object is not available when using WebDriver. ' );
89
+ }
90
+
81
91
public function followRedirects ($ followRedirect = true ): void
82
92
{
83
93
if (!$ followRedirect ) {
@@ -180,7 +190,7 @@ protected function createCrawler(): Crawler
180
190
181
191
protected function doRequest ($ request )
182
192
{
183
- throw new \Exception ('Not useful in WebDriver mode. ' );
193
+ throw new \LogicException ('Not useful in WebDriver mode. ' );
184
194
}
185
195
186
196
public function back ()
@@ -258,9 +268,9 @@ public function get($uri)
258
268
$ uri = $ this ->baseUri .$ uri ;
259
269
}
260
270
261
- $ this ->request = $ this -> internalRequest = new Request ($ uri , 'GET ' );
271
+ $ this ->internalRequest = new Request ($ uri , 'GET ' );
262
272
$ this ->webDriver ->get ($ uri );
263
- $ this ->response = $ this -> internalResponse = new Response ($ this ->webDriver ->getPageSource ());
273
+ $ this ->internalResponse = new Response ($ this ->webDriver ->getPageSource ());
264
274
$ this ->crawler = $ this ->createCrawler ();
265
275
266
276
return $ this ;
You can’t perform that action at this time.
0 commit comments