I am trying to close excel after saving the file. I am using the click activity and to attempt to push the X on the close, upper right. I have used the “indicate on screen” twice the same way and got two different selectors and neither of them work.
as I said in my other Selectors Topic, “Understanding Selectors in Detail” I have not, so far, found anything that documents what the different parts of a selector mean. I have some indications of course but when one doesn’t work and throws and exception there is no help in figuring out which part of the selector is not recognized.
I am finding selectors flaky and fragile. They work for awhile then simply quit and throw exceptions.
Anyway can someone give me a clue why the “indicate on screen” gave me two different selectors and what is wrong with either of them so I can get excel to close reliably? Or another way would be fine. I tried a simple macro with application.quit but that threw and exception as well. ARGGGHHHH…I’m posting another topic on that one
Good grief I forgot all about that one. Duh. Thanks.
can you give me any guidance on what the different parts of a selector really mean or where to find that information, since I’m sure it would be extensive?
yours, for instance, just took the indexes off. What made you think of that?
English not a problem. it’s understandable. So that was a good catch on the differences between them. It’s interesting that, like you say, there is only one close button so where does the idx=3 come from. I did try yours and that didn’t work either. I’ve attached the workflow even though close application was the right answer. I’m just looking for anything I can on how to understand selectors because they seem to be very flaky and I hope it’s my understanding of them more than the selectors themselves. The test references a spreadsheet but the only thing needed in the spreadsheet is the macro “MaximizeActiveWindow” which contains “ActiveWindow.WindowState = xlMaximized” to get to full screen because I found if I didn’t do that then excel might open with all sorts of wierd window sizes and some of them would make the activities not work. “main has thrown an exception” “Bill has thrown a fit” Joking of course. testinghotkeyselectors.xaml (15.9 KB)
Do you have more than 1 Excel file open? That could explain idxs and their values can differ depending on what is considered “on top”.
For various nodes in generated selectors, Uipath generates the least information needed to traverse ui tree and find the element at the moment of generating selector. So when generating it might be enough, but if you alter application state (f.e. Display different menu part on ribbon) it might not be enough during execution.