PuppeteerSwitchToTab index give me the wrong tab

Hi

I use PuppeteerSwitchToTab to switch between tabs but the problem is that the index is changing every time and always gives me the wrong tab

Are you using a 0-based index? The first tab has index 0.

yeah I know that, please try to open many tabs and select tab index 0 and every time you will get a random tab and sometimes you get this error “Index was outside the bounds of the array.” when I put index 0, I don’t know why but in OB1 I don’t get this issue at all

Please post a bug on github and I will look into it

2 Likes
1 Like

Hello @Ruri
This bug was not fixed !

You can see the blocks:


The first try works well:

But the second and third…

Hello, what do you mean “first try, second try, third try”? Do you just run the debugger multiple times? Put multiple blocks? Leave the browser open between each try?

Feel free to reopen the issue if you think it’s not fixed.

Hello @Ruri
I closed browser after each try, when I open a browser with two new taps my pages indexes are from 0 to 2, I would like to switch tap to the index 1 but each time that I run debugger I get different index.

Ok, please reopen the related issue so I can look into this, and link to this forum post. Thanks.

OK
Thanks for your answer @Ruri