UiPath.UIAutomationNext.API.Contracts has been deprecated in Coded Automation

Hi Everyone,

I has just updated latest version for UiPath Studio. UiPath.UIAutomationNext.API.Contracts has bee deprecated in Coded Automation.

It make me can not use code below to open web browsing.
var homeScreen = uiAutomation.Open(“Home”);

Could you advise me the latest way to open web browsing in coded automation?

Thanks.

Hi

I think u can use UIAutomationNext Api
Give a try with this approach

var app = Application.AttachOrLaunch(new ProcessStartInfo
{
    FileName = "chrome.exe", // or the browser you want to use
    Arguments = "https://www.example.com", // replace with your desired URL
});

var mainWindow = app.GetMainWindow();
var browser = mainWindow.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Pane));

Let us know for further clarification
Cheers @hai.nguyen

1 Like

Hi Palaniyappan,

Thanks for your support.

I’m not good at coding with C#, just trying to use new function “Coded Workflow” in Coded-Automation of UiPath to access Web Browsing.

At previous package, I can use code UiAutomation.Open to open web browsing, but when i update package UiPath.UIAutomation.Activities to latest version 23.4.8.

There is no UiAutomation.Open anymore, UiPath has just give me an advise
UiAutomationClientsideProviders

I have no idea how to use UiAutomationClientsideProviders. When i copy and paste your advise to UiPath it shows an error as screenshort.

Could you help me to check and advise me latest way to open web browsing with Coded Automation in UiPath?

Thanks.

Hi,

In my environment (23.10.0 beta) uiAutoamtion.Open method works without exception or warnings.

To isolate cause, can you try the following sample?

Sample20230928-2b.zip (2.6 KB)

Regards,

1 Like

Hi Yoichi,

It worked.
Thanks a million for your advising.

1 Like