Hi everyone,
I have a bot that interacts with a website, when clicking on a button it opens a new tab, but the focus stays on the first tab, I have tried to use attach browser to switch to that new tab using the title but it turns out that both have the same title, and I can’t use use application/browser because the url is dynamic and changes continuously. Please help.
→ Insert another Use application\browser activity after click activity which is directing to new page.
→ Use another Use application\browser and indicate the redirected webpage.
→ Change the properties as below,
→ Open - IfNotOpen
→ Close - IfOpenedbyApp\Browser
→ window attach mode - Application instance.
Check the below image for better understanding,
For the first Use application\browser activity change the window attach mode to Single window.
Inside Second Use application\browser activity insert the Ui activities to work on second tab (Redirected window).
Hello, thank you for your answer but I did not understand you well, do I have to use 2 use application/browser in addition to the one I am already using where am I clicking the button that opens another tab? 3 “use application/browser” activities?
Here we are working with only two Use application\browser activities.
First Use application\browser activity you are already, just change the Window attach mode to Single window in properties.
After Click activity Insert the New Use application\browser activity (Second Use application\browser) and indicate the newly opened webpage (new tab). Then change the properties for this Use application\browser activity as below,
→ Open - IfNotOpen
→ Close - IfOpenedbyApp\Browser
→ window attach mode - Application instance.
Inside the Second Use application\browser activity insert the Ui Activities to work on newly opened tab. Then the bot will go to new tab and perform the actions there.
but when indicating the new tab in the use application/browser it saves the current url of the tab, and the url changes in different cases in which it is consulted, it has a fixed part but the rest is dynamic.
After indicating the browser for the second use application/browser activity, remove the URL, open the selectors option in the properties and remove the attributes which are changing everytime or use wildcards.
Hello, it still doesn’t work, I changed everything as you told me, and in the selector I have this set:
"<"html app=‘chrome.exe’ title=‘Market’ url=‘https://market.es/members/disputes/create*’ />
I don’t know how to use the selector very well, I think, the asterisk at the end of the url is what is usually dynamic but I don’t know if that’s right or if something should be changed.
One question, does the second “use application/browser” have to be inside the “do” of the first “use application browser” or does it have to be outside?
Don’t think of tabs as tabs, they’re really separate browser windows. And you attach to browser windows with Use Application/Browser.
when clicking on a button it opens a new tab
Is the URL always the same? Then instead of clicking the button just Use Application/Browser and give it the URL and set it to “always open” and then you’ll be working in the correct browser/tab.
Even if you need to build the URL (ie dynamically use values from variables to make the URL) this is still a good way to do it instead of clicking the button.
new tab using the title but it turns out that both have the same title
There are other properties of a browser besides title.
Can you give me a confirmation Click activity which is opening a new tab, have you inserted in First Use application/browser activity or second one… @RPA_NOZAMA
If you are insert Click activity which is redirecting to other tab you have to insert in first use application/browser activity.
idx should be avoided at all costs. There are better ways to handle this, like using URL in the selector or getting the URL from the button/link and then manually opening it with Use Application/Browser