Not typing in next tab?

I have used do while loop to open four tabs (browser). I want to type into next tab after completing in each tab. But the problem is that it’s not typing in the next tab. I have used hot key (control+ tab) for next tab but it’s typing in the previous tab.

Main.xaml (16.3 KB)

@Samraat_Maharjan1

While opening get the browser element from each tab…and then use it in the following attach activities and then use each tab as you need

Alternately you can try using title to attach if they have different but using the output argument when you open it would be a beat option to switch between tabs

Cheers

1 Like

Hi @Samraat_Maharjan1

  1. Use the “Attach Browser” activity to attach to the current tab.
  2. Use activate actions to make bot control in browser.
  3. Use the “Type Into” activity to enter the text in the required fields in the current tab.
  4. Use the “Send Hotkey” activity with the key combination “Ctrl + Tab” to move to the next tab.
  5. Use the “Element Exists” activity to check if the next tab has opened.
  6. If the next tab has opened, repeat steps 1-5 for the next tab. If not, exit the loop.

Regards,
Kaviyarasu N

Hello @Samraat_Maharjan1
Use Attach browser for each Tab. In the attached browser place the type into activity for the respective Tab.
While the process running it will automatically switch the Tab and write data into it.

No, no I can’t do (getting browser element from each tab manually) that because I have opened multiple tabs (5) using loops as you can check my code above. Also, it’s the same page in my actual project as well. Since it takes time to load certain buttons. I need to duplicate the tab.

Can you please explain a bit about your second point? Okay, i will try to use element exists and see what it happens but it didn’t really work in my previous practice as it keeps searching for that element and throws false.

@Gokul_Jayakumar I am not manually opening different tabs. I am opening each tabs by using loops.

@Samraat_Maharjan1 , The concept is, If you are using the Attach browser in development, the activities work only in the specific tab. If you need to type in different tabs, use different attach browser in code and place type into activity inn respective attach browsers.

I basically duplicate same browser five times with hot key (control + shift + k). I wanted to do few actions (type into, click, select and submit) in one tab and move on to next tab upon completion. How can I achieve this? The problem is it throws error and it doesn’t type into next tab

@Samraat_Maharjan1

So all the window names are also same?

if yes…then use idx on the first window attribute and check if that works for you

cheers

Yes, it’s the same windows. How can I use idx value to nagivate to other tabs.

@Samraat_Maharjan1
Try this

  1. Use attach browser for each browser tab.
  2. in the attached Browser, place the type into activity, click activity or required. Do the same for all 5 attach browsers
  3. While the process running, it will automatically type values in respected Tabs.