UIElement no longer valid at Excel

Hi, I have read the other UIElement no longer valid posts but they are mostly working with Internet Explorer or Citrix environment.

My issue is with an open application activity, where I have the application path as FileName and the below as selectors.


During a recent run, I’ve encountered this “UIElement no longer valid” error and its the first time in like 2 months and doesnt happen anymore.

Once try checking the second attribute.

May i ask why having only excel.exe is not sufficient?

Have excel.exe and in argument parameter pass your full file path and test once.

By argument parameters, you are refering to the fileName field in properties right?
I’m doing that now. Have excel full file path there and excel.exe as selectors.

The issue happened once and didn’t happen again but I would like to know why it happened then.

Yes file name.
Why that happened at particular moment is something hard to answer it appropriately.

Anyhow you can always use try/catch block, element exists etc., based on scenario and handle these kind of intermittent issues.

Its hard explaining to my client why this happened.
I’m thinking of using a try catch, and kill process during catch then wrapped by a retry scope…

This might be due to system busy, network issue many to list.
But as stated, yes using try/catch will certainly solve the problem provided business case is taken care