Help with Check App State in StudioX

Hi team, I have looked thru the forms for something similar and am not finding a hit here.

I am a newbie - this is my first UiPath automation and up to this point, its been going very well. Once i get this working, I want to switch over to Studio so I can get into advanced automations but Studio is beyond my capabilities for now.

My use case
Our enterprise team is moving our serivcenow instance but i have some data that i need to move - lots of PRB records and PTASK records.

I am using a spreadsheet that contains lists of the records i want to move and i launch chrome to go to the record, pick up attributes off the record and save them to excel for later use to create the new records! I also use the export feature in servicenow to download a PDF of the record and then click on attachments and if there are attachments, clicks DOWNLOAD ALL and saves the zip file that ServiceNow provides.

This works perfectly for the PRB records. Sweet. UiPath downloads the zip files of the attachments to my hard drive. Perfect!

But the PTASK, I cannot figure this out - there is something awry i think with our ServiceNow UI. I note that in the PRB UX that looks identical to the PTASK, but when i pick the “Download All” button as the target, the target is displayed as green on PRB but when i pick the target on PTASK it goes from green to red and i get an error message:

The element was not found
either the state of the application is not the correct one, or the configuration of the target and anchors is not correct.

I have also tried this in Edge and that gives the same outcome. I dont use Edge generally so there is little to no chance this is something awry in my cache.

I appreciate any assistance here.

thanks
Glyn

Another couple of things i tried:

  1. I tried setting up a whole new project to see if it was somehow something bad inside my project. No deice. that had no bearing.

  2. I tried picking the same UI element in a Click Activity, and that found the UI element and all was Green! Is there an alternative sequence of activities that I can use instead of a Check App State?

  3. Not tried this yet, but i am going to try a simple reboot in case something’s got hosed here.
    thanks
    Glyn

So the reboot didn’t help any either - I did not think it would. I have resorted to skipping past this and handling this manually for now, so i can finish up the rest of the robot. Going to work on the steps to create the new records in the new system now. I don’t think i will need Check App State there and there really should be minimal logic except perhaps based on excel cell values which i am hoping will be a lot simpler!

Hi @glyn.tomkins

Did you try just using the strict selector?

Glyn,

I know your post is a year old, but I’m very curious if you ever figured this out, as I just encountered the exact same issue using the “Check App State” activity within my project. It appears to me to be a bug with CAS activity, as the element is found just fine from other activities. Here is a screenshot of my error:

image

Much like you, nothing I tried could “force” the activity to recognize the element. But I found a work-around.

In the event that someone encounters the same issue, this is the work-around that helped me get past it:

1.) Before the Check App State activity, I inserted a “Find Element” activity and outputed the element found to a UiElement variable.
2.) I then pasted that variable into the “Input Element” property of the “Check App State” activity.

Doing it this way, CAS was able to then verify that the element was present and my sequence was able to then work.

Hopefully this may help another UIP developer in the future.

Best regards,

Ron Turrentine

This is kind of pointless. Just get rid of the Find Element and Check App State and use Element Exists then an If to check the output value of the Find Element.

I agree, your solution is much cleaner, while mine is redundant.

The real problem here, though, is Check App State not working properly. Since I posted the above, this has happened to me yet again: Check App State says that the element cannot be found, while activities like “Click”, “Find element” and “Element Exists” find the element just fine using the exact same selector. I truly believe this is a bug, but I am unsure as to the factors surrounding the activity to fail, especially since it doesn’t happen often.

Thanks,

Ron

I’ve had the same happen, it just really depends on the app. We have one particular app where the modern stuff just never works. The classic activities are more “raw” and work fine in that app.

It could come down to all the extra settings in Check App State like visibility, etc. where you’d have to find settings that work. Could be as simple as the app or web page giving abnormal values for things.