TestProject Forum
Powered by leading experts in the test automation community

How to Open a New Tab

Is there a way to create a step that opens a new tab? I found an option that let’s you swap between tabs, but nothing for just opening a new one. I’m trying to automate a password recovery process, so I want to open a new tab and check the email, then swap back to the original tab and enter the verification code.

Hi @jbauer,

Thanks for reaching out!
In your case, I don’t think that opening a new tab is the correct way to implement it.
I would suggest you to create a new test that will navigate to your email inbox, read the email and save the verification code in an output parameter.
Then, simply call this test inside your main test. That will get you the verification test and continue with the rest of your main test’s flow.

It’s also much better in terms of maintenance and reusability.

As for the opening of a new tab, it’s only possible if you perform some action that triggers a new tab opening (e.g. clicking on a link, etc.).

Let me know if you’ll need help with that :slight_smile:

Kind regards,
Amit

Thanks for the reply. I had already set up navigating to the email site, checking the email, and adding the verification code to a project-wide parameter as its own test. However, since all the tests are performed in the same window, it still navigates away from the password recovery page to a different page, and I am unable to navigate back to that page without going through the verification process once again. I tried both navigating to a URL as well as navigating back to previous pages.

Is there maybe an addon that could open a new tab? I checked but did not see anything.