Variable of type UiPath.Core.Browser

browser
studio
variable

#1

Hi all,

can anyone help me out in two questions:

  1. UiPath.Core.Browser - how do I set up one’s variable of this type? if I want this variable to return, say Chrome?
    and has it anything to do with UiPath.Core.BrowserType? so if I do that:
    UiPath.Core.BrowserType.BROWSER_CHROME.ToString - this, as I understand ENUM and it will return BROSER_CHROME, will say Navigate To activity digest this value as a Browser?

  2. I’ve Open Browser activity inside of a sequence which goes to yahoo.com and does some actions.
    Then I’ve Navigate To activity inside the Do sequence of Open Browser activity which shall redirect the browser to finance.yahoo.com. So, the problem I stumble across is “Browser” in input field property. What exactly UIPath expects me to input there? I tried Chrome and it didn’t swallow that. I tried UiPath.Core.BrowserType.BROWSER_CHROME.ToString and it didn’t work either! :smile: so, I’m a bit puzzled.

Many thanks!


#2
  1. Dont build that object yourself - use the output of OpenBrowser or AttachBrowser activity.

  2. Pass the browser object to it from #1. If you use it inside OpenBrowser or AttachBrowser, you can leave it empty and it will get it implicitly from the context.


#3

Thanks very much for response Andrzej! Any thoughts where can I find materials on UiPath namespace? and what that BrowserType is used for?


#4

UiPath libraries are designed to be used as activities - if you call them directly it’s essentially unsupported, since SDK is not available for a long time now (this essentially means that the API for the calls is not guaranteed to remain stable and your code can break).
Check the activities guide for more info on each of them. Do note that it’s written as to how to use them as activities, not via direct calls.

BrowserType AFAIK is only used internally (probably for Browser object factory and maybe for directing some calls). It’s nothing we should be concerned about, at least most of the time, since we don’t need to discern between browser types on runtime (usually - unless you have some generic browser workflows that need to know which browser to work with, which is 99% not the case).


#5

Thanks for the clarification Andrzej!