We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af5ef76 commit 289028fCopy full SHA for 289028f
src/Codeception/Lib/InnerBrowser.php
@@ -296,7 +296,15 @@ private function getCrawler()
296
297
private function getRunningClient()
298
{
299
- if ($this->client->getInternalRequest() === null) {
+ try {
300
+ if ($this->client->getInternalRequest() === null) {
301
+ throw new ModuleException(
302
+ $this,
303
+ "Page not loaded. Use `\$I->amOnPage` (or hidden API methods `_request` and `_loadPage`) to open it"
304
+ );
305
+ }
306
+ } catch (BadMethodCallException $e) {
307
+ //Symfony 5
308
throw new ModuleException(
309
$this,
310
"Page not loaded. Use `\$I->amOnPage` (or hidden API methods `_request` and `_loadPage`) to open it"
0 commit comments