How to use try catch when type into error occur

Hello, there is a problem when using the activity.

There are occasional exceptions when using type-into, which is when the element to type-into does not come out.

In this case, I’m going to use a try catch to deal with an exception
The sequence I wrote cannot be treated as an exception, and the workflow is interrupted by an error.

I would like to use try catch to deal with exceptions when type into error occurs.

It’s my first time using try catch so I don’t know what to do.

I’d appreciate it if you could help me.

Below are the two corresponding screens.

@sssim4567

As per screenshot we can see when type into fails it goes to click on something and then creates a file and writes data to it

What is the issue you are facing now?

Cheers

Hi,

Can you try either of the following?

  • Just “Run” instead of “Debug”

  • Turn on “ContniueOnException” on ribbon menu, then Debug

  • Press Continue button on ribbon when workflow stops due to exception

Regards,

Hi @sssim4567 ,
Have you tried edit selector of ‘Type into’ activity
delay before, delay after, click before type…
regards,

When you press the Download button, a Save window appears.

And when that window comes up, we’ve created a process to type into the storage location and name.

However, there are times when the save window does not appear once in a while.
This causes an error in type-into, causing the flow to go down.

I’d like to move on to handling this situation as a try catch exception.

Try catch does not work.
Flow is interrupted because of type into error.
This is the problem I’m facing.

@sssim4567

So till the saves as window comes up you want to click on the button?

If so then in the click activity you have a verify option…where you can indicate the type into field so that the click happens multiple times till the type into window is appeared

Cheers

It’s not because the window is delayed

The download click button is disabled
Even if I press it, it doesn’t come out, so the storage window can’t come out.
That’s why I’m trying to move on to an exception.

It’s not because the window is delayed

The download click button is disabled
Even if I press it, it doesn’t come out, so the storage window can’t come out.
That’s why I’m trying to move on to an exception.

@sssim4567

So on exception what you want to do?

Because as per the screenshot you are already usingn a try catch so it should handle…

When running in debug it would look like it threw error just do a step into/continue and it would move to the catch part from try

Cheers

It’s my first time using “Try Catch”, so I’m not sure

I understand that in case of an error, I can put the sequence that will work instead into the catch.

So, if an error occurs like now, the phrase below the try will not work
I hope to go directly to the catch and run the activity on the catch.

But now my wish doesn’t come true and the flow is interrupted by an error. I want to fix this.

@sssim4567

That is what happens…as mentioned just do a step into /continue and the control will then go to catch block…or run in run mode instead of debug it would move without stopping

Cheers

Is there a solution without using Try catch?

What I want is as follows.
Sequnce
“A”, “B”, and “C”. Let’s assume that the order is “A”, “B”, and “C”

If an activity in ‘A’ sequnce error occur, the next rest of the normal activities in ‘A’ sequnce will not work(this is skip) because of the previous activity error, regardless of its own error occur or not.

Then
Instead of “A” Sequnce
The activities of ‘D’ Sequnce are working.
‘D’ Sequnce does not work in normal situations and only works in case of A error.

In this case, it will proceed in the order of ‘D’, ‘B’, and ‘C’.

This is what I want.

@sssim4567

Try catch is ine way as you used

Another way would be to use a check app state activity to check for save window…if window present then perform steps of A if not present perform steps of D

Cheers