Automation stops after few instance of click with attached error

Hello Team, Just need some suggestion. In below images it says target element is disabled. Manually need to click reset button available on screen and enable again.
Is there anyway if its disabled, we can click on reset button again to enable this and continue the next flow? Any suggestion will be helpful.

Hi @Ranjit_Nayak1

You can add Try/Catch block to catch the exception with your type and message.

Then If it happens, inside the catch block add a logic to click ‘reset button’ and proceed with Type Into ‘INPUT txtVehicleNo’ again.

Hello @Ranjit_Nayak1

You can use “Get Attribute” activity to get the status of the element if it is enabled or disabled.
if it is in disabled state, you can perform the click reset button and followed by type into.
if it is in enabled state, you can use type into to type the text in the textbox.

hope this helps.

Cheers

Thanks for the reply. Whole code is already inside try catch.

Do i need add try catch block inside again?

And which part should go inside?

Hi Venkat,

Thanks, so i need to use first if disabled state and click reset, remaining will be outside.

Will try this.

Understood.

Well, you could do both but adding new TryCatch will be easier to implement

Create new TryCatch.
Inside the new TryCatch add the click activity.
If it fails run the ‘click reset button’ and Type into again

But the solution by @Venkat4 is much easier to implement so try this first.

use “Get Attribute” activity to fetch the status of the text box followed by if condition to perform the action based on the status of the textbox.

Cheers

hi,

image

–In type into activity in properties set “Alterlfdisabled” as a TRUE

thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.