Exception handling for Type Into Activity

Hello Everyone,

We are working on a project where it uses multiple type into to enter details. But at times incorrect details are typed

Example: It has to type month as 4 but it at times will type as 44

Then the next screen is not found because some of the fields were typed incorrect

How do we handle these scenario in a better way

Thanks in advance

Hi

Hope the below suggestions would help you resolve this

  1. First on typing values on correct files make sure the scope or region where u want to type is define
    That is use ATTACH BROWSER or ATTACH WINDOW activity and define the region where the field to be typed in is there
    And then inside it mention the TYPE INTO activity so that it doesn’t miss the field or the typing action

  2. Second while typing if u feel like it’s typing fast or skipping values there are two ways to handle it
    Either we can slow down the typing speed by including some delay between key strokes
    I’m type into activity I can find a property called DelayBetweenKeys and put some milliseconds there
    Other way is by following copy paste method instead of typing
    Here u just pass the value to SET TO CLIPBOARD activity and then use SEND HOT KEY with ctrl+v as key
    So this will paste instead of typing

  3. Finally if u want to handle the type into exception that can possibly occur
    Either surround that type into with try catch or retry scope if u have less number of type into activities
    If u have more number of that activity it is good to use GLOBAL EXCEPTIONAL HANDLER so that it can capture that error and gets logged

Cheers @anmita

1 Like

Hi @anmita

Before typing the values into the field, please validate the data and then type.

Or if you are not sure on validating the data. Take try catch scope for the next activity which is after type into and do the steps which you will do manually after getting the error in the catch block.

@anmita use modern type into activity
on the properties pane, set verify execution = verifyExecutionTypeIntoOptions

tick retry and set timeout = small number e.g. 3, this will make it so that every 3 seconds, it will check if the text typed = your input, if its not equal, it will retry the type action
image

If the time set here (DEFAULT 30 seconds) has elapsed and the text is still not equal to your input, it will throw an exception

1 Like

Thanks @Palaniyappan , @shreyash_shirbhate and @jack.chan for the prompt response

1 Like

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