I am attempting to fix a process that was built in 2018.4, but we have since upgraded to 2019.10.
The process is submitting files within a portal, so we are dynamically building the selector for each report that needs to be processed.
Here is the code that creates the selector:
And here are the variables being used in that code:
When I build a selector with the same format as what we are dynamically generating, it passes the validation check in the editor.
When I step through the process in debug mode, it behaves as expected, finding the element correctly.
However, when I just let the process run, it keeps right-clicking on the frame instead of the element.
What am I missing?
Hi welcome to the community!
If it is only a click activity and no changes in the application, i dont see why that upgrade would cause a problem, but you should check exactly what is the selector that is being generated so we can see if it has anything wrong…
Boy, it really doesn’t help when the variables don’t show up, huh?
So, ignore the folderLine variables, but that should give you an indication of what we’re looking at here.
I dont recommend that use for selectors to be honest, you should keep your activities inside a open browser or attach browser and use partial selectors only, also you do not need to use those line breaks, you can use a single variable with the selectors in the same line. Also working inside iframes can only work using IE browser, but avoid them if you can pass the url of them in the browser activity instead will be better.
That event is within an “Attach Browser” activity, so, if I’m understanding what you’re saying, we don’t need to use the “dynamicLine1” variable, then, correct?
I am also confused by your “IE” statements, because this process was working before the upgrade, but it has always been pointed at a Chrome browser. So, are you saying that we should have an “Attach Browser” within our outer “Attach Browser” that passes in the URL of the iFrame?
yes, i would never use that dynamicLine1 in any activity selector but the browser ones, that would qualify a selector as a Full Selector, making your code much harder to mantain.
I also never nest browser activities, unless they are windows inside a parent window, but i meant using the url of that iframe in an attach window already inside the parent application or isolated if it is a different application.
What i mean by iframe only works in IE, is that elements inside them can only be identified (by the studio or uiexplorer) when using IE, but a selector can work anyway…
I’m honestly still at a loss. I did make the change that you were suggesting regarding removing the dynamicLine1 variable from any of the selectors I was building, and that seemed to be fine. We’re fairly new at this, so we were just copying the style of all of the other selectors, but that makes total sense why that one wouldn’t be needed.
What’s baffling to me now is if you take a look at the variables I sent earlier, I am able to dynamically create a selector that works for the folder (String.Concat(String.Format(folderLine2,folderName),folderLine3)))
That folder is within the same frame as the report. The report is a child of that folder, so you would think it was as easy as passing in a selector in the same fashion as the folder:
I also tried naviagating to the frame itself, but I don’t have the same options when I right-click on the report, so that doesn’t seem like it will work for me.
Sorry, as you talk specifics to your application i dont understand much… You say that using the url of the frame isnt an option you can use right? Is using IE a viable option or not? Because not using it and getting the full frame instead of the element you want is standard behavior for me…
We have developed the application for use with a Chrome browser. I am not certain if I can switch to IE or not (I can give that a try next). Where I am confused now is that I have been able to get a specific element within the frame when I am opening up the folder, but when I try to get the report underneath that folder, it is spotty. Sometimes it will find what I’m looking for (mostly when I’m debugging it manually), but most times it does not.
Does that answer your question? I do appreciate your time helping me with this, and I’m hoping I’m not just talking in circles.
Yes, i understand now the behavior you are explaining, when you are in your studio, can you point to that folder element and/or the report or it has that behavior of the execution (mark the whole iframe content)?
If I’m understanding what you’re asking, then yes, I believe I can. If I “Indicate Element”, I can go into UIExplorer, and this comes back as a valid selector:
That is the report selector, FYI
ok, then it is all good, i guess i have old things in my head when iframe did not work well outside chrome, so from studio this works well, where is this not running well, is the version of uipath upgrade all ok?
When I run from Studio in debug mode, it works sometimes, but not always (which is maddening). If it is working, it is when I am stepping through event by event.
If I just let it run without debugging, it does not work.
When I run from Orchestrator, it does not work.
@bcorrea, thanks for being so welcoming to me and attempting to help me through the issue. After looking through everything, it turned out that there were a few reports that had been duplicated in multiple locations throughout the folder structure. So, when I built my selector dynamically, I was just passing in the name of the report that I wanted to use. It found a matching selector, but not the matching selector in these cases, and so it was trying to click on an element that was not visible on the screen. Again, I appreciate all your help leading up to that!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.