Codeception / lib-innerbrowser

InnerBrowser
MIT License
80 stars 20 forks source link

Add redirect methods #29

Closed TavoNiievez closed 3 years ago

TavoNiievez commented 3 years ago

See https://github.com/Codeception/Codeception/discussions/6038 .

ThomasLandauer commented 3 years ago

@TavoNiievez This was released already? Cause I'd suggest to rename followRedirect to openRedirectedUrl (or openRedirectedLocation or openRedirectedPage). Why?

Questions: 1: It does not startFollowingRedirects? I.e. it just follows the pending redirect from the latest request? => Should be explained explicitly. 2: Talking about "latest": If I stopFollowingRedirects, then do 5 amOnPage, then openRedirectedUrl: Only the redirected URL from the latest amOnPage will be executed? 2a: But if this redirect yields another 3xx response, that page won't be called (see 1)? But it will produce another pending redirect, so calling it repeatedly does make sense in some situations:

$I->stopFollowingRedirects();
$I->amOnPage(...);
// ...
$I->openRedirectedUrl();
$I->openRedirectedUrl();
$I->openRedirectedUrl();

TODO:

Naktibalda commented 3 years ago

Yes, it was released as 1.4.0 right after merging.