← Back to Discord Forum

How to work with a redirect correctly ?

Redirection is not registered - although it has occurred

`IResponse? response = await page.GotoAsync("https://example.com");

Console.WriteLine(response?.Request.RedirectedFrom?.Url); Console.WriteLine(response?.Request.RedirectedTo?.Url); Console.WriteLine(page.Url);

// Output: // // // https://example.com/other`

This thread is trying to answer question "Why is the redirection not being registered even though it has occurred?"

0 replies
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.