Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goto times out on redirect #2623

Open
SzajJolanta opened this issue Jul 21, 2022 Discussed in #2622 · 0 comments
Open

goto times out on redirect #2623

SzajJolanta opened this issue Jul 21, 2022 Discussed in #2622 · 0 comments

Comments

@SzajJolanta
Copy link

Discussed in #2622

Originally posted by SzajJolanta July 21, 2022
Hi.
I have an issue.
I have a dynamic list of certain URLs I have to visit (around 5000), some of them are not valid and the page loads for a split second on that URL, then it gets redirected to the home page again.
I can not remove those URLs that cause redirects. I have to visit them and perform certain check.
The thing is that when taiko's goto() lands on such URL, it stops and does not go further. The next iteration of the 'for' loop does not happen and timeout occurs.

`
// arr <- this is dynamic array of URLs

for (let i = 0; i < arr.length; i++) {
 await goto(arr[i], { waitForEvents: ['DOMContentLoaded']});
    let currURL = await currentURL();
    console.log(arr[i])
    console.log(currURL)
}`

This sounds like similar issue to mine but can not find a solution for it https://spectrum.chat/taiko/general/i-am-having-issues-with-using-goto-when-the-page-redirects-it-doesnt-seem-to-detect-redirects-and-wait-for-redirect-to-complete-before-moving-onto-the-next-step~310440ec-9195-4928-814c-f764313c37c5
Please can you help me handle such redirects so the loop can go on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant