Okay, this will probably either be a really dumb question, or a really smart one… I was having some issues in a project when using the “Input element” and “Output element” properties on a “Use browser/application” activity. My issue was that I want to pass the uielement variable between flows, and it needs to contain some dynamic selectors to allow it to keep working between different items that I process. Unfortunately, it happens frequently that the “Use browser/application” couldn’t find my specified uielement. To test if I understood the logic correctly, I made a small test:
New Use Application/browser, input is uiOutput2 (which is the original, that didn’t navigate to Google)
Type in the search bar: “wtf is this[enter]”
I expected this to fail, because uiOutput still points to RPA and Automation Conference 2022 - FORWARD 5 | UiPath instead of Google, but to my utter confusion the workflow worked flawlessly. I checked both uielement variables after each step in the flow, and they are always 100% the same. So my question is, are there some hidden properties that UiPath uses to identify the browser session or something? Am I missing something very obvious?
uiOutput.Get(“innertext”).toString
here you can use all available Attributes (check for this: uiOutput.Attributes)
as you can see under uiOutput.Selector.toString the full Selector (up to Parent) it can be derived on whre the input will act and also can jump out from any scopes (Browser / App, Attach Browser)
UiOutput2 has UiPath.Core.Browser instance. So this means to able to use uiOutput2 like UiPath.Core.Browser.
For example, classic Attach browser will work with UiOutput2 from Use Application/Browser as the following.
Looking at the attributes, I’m guessing the PID/TID is what helps the scope to find the right session. But doesn’t that make the selector redundant? the “title=‘FORWARD IV’” etc will never match the Google.com website, though it attaches it seemlessly?
A more practical idea: maybe I could get the page title (get attribute?) and update the uielement before passing it to the next workflow?
This confused me a bit. I can see how it finds chrome.exe (obviously), but the selector says “title=‘FORWARD IV’” etc which will never match Google.com. So I would expect the selector to fail and show an error?