Unable to access elements in the new tab

browser
studio
web

#1

Hi All,

I maybe repeating this question. But I have tried everything given on other topics but none of them worked for me.

So I have a link that I am using in IE and clicking on some hyperlink within it leads to open a new tab. Currently I am in the new tab. Now if I try to add any activity using the elements of the new tab and execute the flow, it stops from where the new tab activities begin.

What I have tried:

  1. Tried using send hotkeys : ctrl+pgup ( to bring back to original tab) and then navigate to URL(copied the new tab URL) - this does not work becasue of the security of the site as it comes with Forbidden error
  2. Tried Attach Window - does not identify the new tab

PLEASE HELP

Regards,
Anshul Agarwal


#2

Hi Anshul,

From my experience, instead on clicking the hyperlink and navigating to a new tab; you can pick the href attribute and navigate there(using open browser) which also outputs you the UiBrowser variable which you can further use it.

Now coming to your question. “…if I try to add any activity using the elements of the new tab and execute the flow…” Can you be more clear here?


#3

When new tabs are opened the Title of the Window changes and your old selector no longer works.
Also note that the Title of the window will be dependent on the Tab that is in focus.
So your best option is in IE settings set new tabs to open in New window( the best option)

ps: Your actions like hotkeys , navigate etc are not finding any selector because attach itself is failing.


#4

Thanks @rajeev85 for the quick response

I used UiPath explorer to get the below attributes. Which one you suggest apart from what are clicked should be used.

image

My other concern was with the new tab if I have to click something or may be type into, that was not happening because none of the elements were getting identified of the new tab


#5

Are you suggesting if we change the IE settings to open the link in the new window then we should be able to normally do any normal activity as what we were doing intially or do I have to somewhere point to the URL of the new window?


#6

Yes. Please change the settings to open New Tab in NEW Window and you will mostly not need to change the code at all .

If it doesnt work check the **Attach Window **Selector , Redo the selector of the attach window/Browser if required.


#7

Thanks for the information. Let me try the same and update.


#8

@jmf

I tried the same but no luck. Gives me below error

image

Should I be using attach browser/window within the previous open browser scope or outside it?

I guess I have tried it both but can try again.Anything else that I am missing?

Thanks
Anshul


#9

I hope you have made the setting change to open New tabs in New IE windows.

you should definitely keep the 2 scopes as 2 different attaches.


#10

Yeah, changed the settings to open the new tabs in the new windows and that is happening.
I have two different scopes. First one where I have open browser and I do all the necessary activities and click on the on the link that opens a new window.
At this moment I have used Attach browser/window (tried both) outside Open browser scope. It either highlights the entire window including the address bar/title etc or the portion below the address bar. I tried selecting both but no go

image


#11

Also, I can definitely see that the control is passed to the new window. Reason why I am saying so I because after the new window gets opened I have used Activate and the passed hotkey ctrl+f and I see that search functionality appears. The only problem is identifying of element within that page.


#12

You are closing in. Earlier your Attach was failing. Now your individual Selectors are failing.
Looks like your individual selectors have ‘title attribute’ which is still pointing to the First IE window. .

You will have to redo the failing selectors .


#13

Hi,

Sorry for a late response. It was a selector issue. Altered it and boom…
Thanks every one for there input