How to automate chromium browser (JxBrowser) embedded in a JAVA application?

There is a desktop JAVA application which is being automated using the UiAutomation. Automating the application itself is easy and causes no problem. There are certain steps in the whole process where the embedded JxBrowser (chromium) is opened within the application. Automating these steps in embedded browser is causing the problem as the ui-elements in the embedded browser are not being recognised upon indicating them using the UiExplorer or any other Ui Activity. (It left us no other option but to use image based selctors)

Related post

Constraint

CV and Image based selector solution is not required

Approach Explored

The UiPath do support custom browser in the Attach Browser/Open browser activities as per their documentation. We tried this approach with Attach Browser, but didn’t succeed.

I feel your pain!

Have you tried changing the UiFramework when spying the elements to AA or UIA (press F4)?
It wont be as good as attaching to the browser though…

Hello, @kumar.varun2

UIAutomation v24.10 supports a certain subset of JxBrowser embedded web widgets. Please enable “WebView2 Native Automation” option in Project Settings (documentation here) and try to indicate an element inside the web widget.

Also, it would help if you could share with us what version of UIAutomation and JxBrowser you are using. For JxBrowser, right-click on “Chromium” in Task Manager, select Properties and inspect the “Location” property – it should end in a version number. For instance, in the screenshot below you can see that we investigate an application that uses JxBrowser 7.30.3.

3 Likes

Hi @csvancea, Thanks for the reply we will try out your solution and let you know the result and the UiAutomation version is 22.10.5 and the JxBrowser version is 7.24.4

@sven.wullum1 yes, we have tried changing the UiFramework, but no success

1 Like

Thanks for the additional information. According to our tests, JxBrowser 7.24.4 should be supported by UIA 24.10, provided that JxBrowser is configured in a standard way and “Enable WebView2 Native Automation” project setting is turned on.

Depending on how JxBrowser is configured by the embedder application, you might also have to set the environment variable UIPATH_WEB_WIDGET_NATIVE_OFF_SCREEN_SUPPORT to java and restart Studio afterwards.

Keep us updated on your progress.

4 Likes

Hi @csvancea

It is working with the changes mentioned by you. The ui elements are now can be easily identified.

Thank you for the support, it is a great help.

2 Likes

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