@Mystical_Devices May I know how many tabs you have to automate in your process
Only 2 in total
i just need help in traversing across 2 tabs and performing activities in them!
Perhaps u can edit my code and show me how,
You can do a lot with the modern experience, but I understand it is difficult to navigate and understand it.
Three ways to achieve what you want
- Classic activity which you shared in your .xaml
- Modern activity and bunch of shortcuts and string manipulation
I have edited the project settings locally, so ensure that you do that before running the suggested approach.
Use the Chromium API in your properties:
Here is the file :
BrowserTabManpulation.xaml (40.2 KB)
Move between tabs – Ctrl+Tab
Get URL from address bar – Ctrl+L
Copy – Ctrl+C
Paste – Ctrl+V
Within a tab – Tab
string.join("/", Url.split("/"c).take(3))+Href changes the endpoint of the url in Wikipedia to the target element you clicked. We do this by getting the href from target element and url from the parent page and combine them using
join, split and take methods
thank you for replying,
i dont understand why we are taking the Href attribute, why not simply get the url attribute and paste in new tab?
anyways i tried taking the URL of the button into the new tab, but my URL is dynamic,
if i press the button it will automatically open a new tab, with the correct page,
however if i use the URL from get attribute, and make a new tab using shortcuts it does not take me to the correct page!
this is why i just want the following:
- after i press button in the main tab and the 2nd tab opens-
- i want to perform activity in 2nd tab, and thats all!
- how can i achieve this using modern or classic acitvities?
oK, please ignore the last part, using ur Href method- the link opens fine on the new tab, however!- it jumps back to TAB 1, and i tried using Control+TAB, shortcuts to switch- but it does not switch!- why?
i even use the click activity to select 2nd tab, but it wont budge, please advise
Which browser are you using here please ?
i m usung chrome
Thanks, will share you a sample soon.
Hi @Mystical_Devices ,
We have understood that the First Page would always be the Below Page Shown :
Next Step is to Click on the link highlighted, But is it the Only Click that needs to be Performed, or do you have to find the links present in the Page one By One and Click and Open New Tab and perform the operations ?
Is it only One Tab being opened up i.e
Business Process Automation and we only need to perform operations on that after we have Clicked the link ?
That is because the selectors in the hyperlink of Wikipedia links has url attribute of parent page and href of target page. If you use the URL attribute, you will end up opening the same page. See the UiExplorer below.
May be this is different on the webpage you are working so it is upto you to check if you need extra string manipulation or not. If your URL is dynamic, you do not need to click either. You could use Ctrl+T to open a new tab and then Ctrl+L to go to address bar and paste your target url (dynamic url) + Enter.
Once the new tab is open. Use the keyboard shortcut activity within the Ctrl+Tab Open application/browser activity.
An approach which your other website might support :
I do not like the right click here as the dialog window of chrome is subject to screen resolution and anchoring it is not so robust. But I think you get the point on how to get this done in the modern activities. Both of the approaches I have in this thread will work, provided you adjust it to your target website and here I am assuming wikipedia was just a dummy website you wanted forum members to use as a case.
The previous approach is commented out:
BrowserTabManpulation.xaml (54.3 KB)
The third alternative is (I dont have it in the .xaml)
- Open Your parent page
- Click on the button
- Use Ctrl+Tab to go to the new tab
so here is what i tried:
i pressed the button- a new tab automatically opens and after 1sec it goes back to the original tab.
so now i used a CTRL+TAB shortcut to go back to the newly created tab, but it does not go, i even tried CTRL+PageDwn shortcut, and it does not move to the new tab.
Kindly check here for the demo workflow,
It works fine for me, Check from your end.
Hope that helps,
It’s important to understand that browser tabs are seen as separate windows.
If Attach Browser is not visible, that’s because you’re in modern. Don’t turn off modern. Don’t set the filters to see classic activities. Use the modern activity that replaced Attach Browser - Use Application/Browser.
But that’s not how you do what you want. To do what you want, you use Find Children. Set the selector to something generic like
<html app="chrome.exe"> and it’ll return an array of all browser windows/tabs that you can loop through and use Get Attribute to get the title.
Does this Activate window work on modern activity as well?
yes @Mystical_Devices, it will. That’s not mandatory. But better to use if you want the screen to be visible else it will just work background.
Please let us know, if you face any challenges.
Use Application/Browser has an activate feature built into the properties.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.