Best practice for using Attach Browser - Selectors or Browser object?

From a reliability standpoint (least chance of errors for my end users) which is safer when using Attach Browser – supplying a UiBrowser object or finding the browser in question with a selector?

1 Like

Hi @BowmanBeric

Welcome to the community!!!

For your question, I would suggest the best way would be to use a UiBrowser object. Create it once and use it every where you need would be the best way to handle attach browser objects. Having such way would be the best practice as it lowers the chances of running into errors.

6 Likes

Hi @BowmanBeric

Welcome to uipath community and that’s a good question to start with
Fine
Yes of course I would even prefer UiBrowser element passed to the Attach browser activity to the property browser in it
—but we need to make sure that we are going to work only in that browser because usually we will be getting UiBrowser variable from either a attach browser with its output or from open browser with its output variable…which means it gives us the UiBrowser element of the browser that is opened previous by open browser or attach browser…
So make sure that we use only that browser I.e the previous obtained browser page
Or
If we are using different web pages then use selector…with dynamic parts of attributes value been replaced with wildcards to take dynamic values when web page changes…

Hope this would help you
Kindly correct me if I have understood the query wrongly
Cheers @BowmanBeric

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.