I'm starting to study about automation, so I started over an application that I work on today. But I had a problem that I'm not sure how to solve and I'd like to know if anyone can help me.
On the system, when I click on a displayed option it opens a new tab in the browser, redirecting to the page of the clicked option. However, automation continues to run on the previous tab and does not focus on the new tab.
Exemplifying better: I enter the site X, there are 4 different login options (Y, P, T, O) I click on the Y option, it opens a new tab that is directed to the login screen of option Y But the automation keeps running on the X tab, it does not focus on the new tab so I can login to the Y screen
If I click on the other options, it also opens a new login guide for them.
From the way I wrote the test, it makes the full flow ... From accessing the site X, select the Y and then log in, but he is not performing for not focusing on this new guide.
Is it possible to do that? If so, would anyone have a hint of how to do it?
The automation I'm doing is with ruby, capybara and cucumber