Coded Workflow - Change Click/type into types to simulate

All, I currently have:

            var username = system.GetAsset("OTM_Username").ToString();
            var password = system.GetAsset("OTM_Password").ToString();
            var screen = uiAutomation.Open(Descriptors.Oracle_Scope.Edge__OTM);
                  screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Username_Field,username);
                  screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Password_Field,password);
                  screen.Click(Descriptors.Oracle_Scope.Edge__OTM.Sign_In_Button);

This does it all in hardware events, how do I set it as simulate clicks?

Hi @David_Hernandez2 ,

Please Try using

screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Username_Field, username, new UiPath.Core.Input.InputMethod { Method = UiPath.Core.Input.InputMethodType.SimulateType });
screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Password_Field, password, new UiPath.Core.Input.InputMethod { Method = UiPath.Core.Input.InputMethodType.SimulateType });
screen.Click(Descriptors.Oracle_Scope.Edge__OTM.Sign_In_Button, new UiPath.Core.Input.InputMethod { Method = UiPath.Core.Input.InputMethodType.SimulateClick });

Hope it helps.

Hapoy automating.!!

Kindly mark this as solution in case it helps you.

Thanks ,
Gautham.

What namespace did you input for UiPath.Core.Input.InputMethod, I get error

Hey @David_Hernandez2

While importing packages,

using UiPath.Core;
using UiPath.Core.Input;

Along with the variable initiation,
// Configuring input methods
InputMethod simulateTypeInputMethod = new InputMethod { Method = InputMethodType.SimulateType };

InputMethod simulateClickMethod = new InputMethod { Method = InputMethodType.SimulateClick };

In line 5 and 6 of existing code ,

screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Username_Field, username,simulateTypeInputMethod );
screen.TypeInto(Descriptors.Oracle_Scope.Edge__OTM.Password_Field, password,simulateTypeInputMethod );

screen.Click(Descriptors.Oracle_Scope.Edge__OTM.Sign_In_Button,simulateClickMethod );

Note: Trying to help with no access to system.

Thanks,
Gautham.

The problem more or so seems to be that “TypeInto” does not take 3 overload arguments, I’m wondering if this is not supported in coded automation yet?

Hey @David_Hernandez2 ,

I guess so, on a high level search i found the type into method takes Selector, Text to be entered and delaybetweenkeys as methods.

I assume same would be the case for simulateClick.

Thank you @David_Hernandez2 , coz i learnt something in this interaction…

Happy automating.

Thanks
Gautham.

A video I found, around the 34 min mark shows how to do it.

1 Like

1 Like

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