I am having a really hard time figuring out why this is not working properly. I have added a try/catch but I do no think the catch is working properly, it may be the type of exception. I selected openspan->Automation-> invalidLinkException. I have a web adapter that is trying to open a java web application. Before the Java application will open I have to select the Run Button on a pop up. When I run the application locally through studio I do not get the error as often as when I run it through runtime, which appears to be slower. I am first waiting 75 seconds and then checking the Run button properties to see if it is enabled before I perform the click. If not enabled I am looping through every .5 seconds to see if it is enabled. The problem that I am having is no matter what I put in the forLoop I get the same error "btnRunJava is not matched". I am not sure why I would be getting this error. If it were not matched then it should go to false and then eventually the forLoop would timeout correct? I have attached my code and the error, any suggestions would help.
@ZachT124 Your automation does not appear to be correct. Perhaps it is just that the image is deleting links, but there appears to be nothing coming off of your Try. The Try Catch really needs to wrap an area of your automation where you wish to catch the exception. I would suggest wrapping as few steps as possible to avoid any confusion. In this case, you are really getting a "ControlNotCreated" exception (at least according to your screenshot). That basically means your control is not matching. You should be able to see in the RuntimeLog all of the attempts at matching (assuming you enable Verbose logging for all categories). I suspect though, that you can identify this in interrogation mode. Do you have any ambiguous matches? Do you need to click Rematch at all during interrogation? Are you certain all controls you expect are matching as expected? I would try to reproduce the issue during interrogation to see what you might need to do to address it.
@ThomasSasnett How were you able to tell that the automation error that I was getting was a "ControlNotCreated"? I changed my exception to "ControlNotCreated" and connected the try. I received this error the other day and I also can not seem to figure out which exception it is (see attached).
Side note... I can not interrogate this project until I get the can not open internet explorer error fixed. I went to run this project in Robot Studio on Friday after it was working on Thursday. I opened a support ticket but the problem is still not resolved. But I do not need to click rematch at all during interrogation. I am not sure about the ambiguous matching. Every time I would inspect the Run button on the pop up it would show that everything was matching when the button became active. When I watch the adapter through the robot inspector I can see that the form and the button is matching but I am still getting the same error.
@ThomasSasnett I did get the try/catch working by changing the exception to the one you suggested. The issue is that the form and the Run Button are not showing as matched. I have attached an image from the Adapter from the Robot Inspector. Any suggestions on setting the match rules once I can interrogate Internet Explorer in Robot Studio?
@ZachT124 I can't really offer much help without getting hands on. You might reach out to your Pega CSM and see if you can get some support from our professional services team as that would probably be the most effective way to address these types of issues. The community is really geared towards general questions. In this case, you must debug this like any matching issue. I would start with determining if calling rematch allows the control to be matched. That would tell you if it was attached to another control or not. I would also try to recreate the issue in interrogation, as that would allow you to change match rules or determine if you have anything ambiguously matched.
@ZachT124 I think you should try opening a support case with our customer support team. Either that, or getting in-touch with your Pega CSM or account team to get some support from our professional services team or a partner.
I knew that was the exception from the message. That was just an experience thing and not something I could read directly off of your screen. If you look in the runtime log, you'll see the exception type listed there. It might also show in the pop-up as well. Generally though, with the Try...Catch, I wouldn't catch specific exceptions. I would just leave it generic unless you wanted to take specific actions if it were one type of exception versus another.