Hello, i have this problem when creating my automation flow
So I have an upload process, where the website will give a notification (success/fail) when the upload is complete, it somehow looked like this:
This is for success upload, when failed it will show a red box with details on what type of failures.
I want to make the activities to wait for either success or failed notification to appear and then act based on the what element appears.
Already tried element exists activity, but it doesn’t wait for the element to appear and just jump to the next activity (logout).
You can use “wait for element appear” activity, although it proved to generate pretty random results at times. I would advise closing “element exists” in a loop, like this:
You could try what Jack proposed, although you would still need to loop it somehow.
You could also put two “element exists” activities inside the loop, saving the output to two different boolean variables. Then you exit the loop if any of them is true, and check which one happened with an “if” afterwards, like this:
I can run the element exist now without problem using @Andrzej_Kinastowski solution
And 1 more question. When I used the “If uploadsuccess = true” when I try to move excel file that are uploaded to different folder, I always get an error like this
Pls copy and paste the code that begins with Directory.GetFiles. I think there’s somethign wrong there.
Why would you use the GetFiles, if you already know the name of the file you want to move? Can’t you just paste the full path there?
Well, in this case, are you 100% sure that you are trying to move the right file? I presume you do something like Directory.GetFiles(“xxx”)(0)?
Taking the latest file is risky, as some other app could have saved something in the temp folder in the meantime.
The first thing I would do is to put a log before you try to move the file, with he same expression you put in “From:”, just to see whether you are trying to move the right file, and not some random temp file.