Find and click on text on Java based application

Hi all,

I’m trying to find and click on text on Java based application.

On my application is a table which is dynamic (it always get fill with different data, so that makes this table bigger or smaller, so it’s change number of rows).

I tried Find text, Get text, OCR text, selection with Ui Explorer…but it seams that robot simply clicks on middle row which he found in that moment.

Also, I do have Java extension installed.

Please advise :slight_smile:
Thanks in advance

Hai @Test_Testtio… Try with Click activity … try to build dynamic selector…
Also refer this link

How click a link on web page which is changing dynamically?

Hi,

thanks for the reply. I tried with extraction of data table.
Extraction works fine-tested it’s able to create .csv file, so that is ok.
Now problem is that results of extraction are stored in variable type- data table. When I do Output data table result is stored in string variable type.
How to do Click activity or any similar activity cause they require uipath.core.uielement variable type?
Is this the right way or I’m missing something here?

Also, Text exists find text but Output is boolean variable type, so still can’t click on it, after it is found

Please advise

any suggestions?

The Text Exists activity will only tell you whether text is found or not, that’s why the output is a boolean.

You should be able to use a selector for the Click activity as opposed to an element. What is the purpose of outputting the data-table to string? If you need to use a value from within the data-table, you can Assign it to a variable with datatable.Rows(#).Items(#).ToString, or use the Get Row Items activity.

I guess I’m grasping at straws here …tried tons of different ways to do do it with different activities, and on some other post I found this as a way to do it…so I gave it a try…

But ok… let’s go back to simplest way, I guess, Find text positions and Click :slight_smile:

So in GUI I need to find and click on a specific row, let’s say based on SO ID (first column).

Trying to find SO ID: 419015955

Let’s say I am using Find text position…and trying to Indicate element on screen I get this:

<wnd app='jp2launcher.exe' cls='SunAwtFrame' title='Manual Intervention' />
<java role='page tab list' />
<java name='Results' role='page tab' />
<java role='viewport' idx='5' />

Robot selects gray area below table also, see it as one…so I tried to be more specific so on a Visual tree, manually using highlighter, I gave robot only table (squared red in picture):

<wnd app='jp2launcher.exe' cls='SunAwtFrame' title='Manual Intervention' />
<java role='page tab list' />
<java name='Results' role='page tab' />
<java idx='2' role='table' />

Put Target text: “419015955” and crate variable as output. Then in Click activity I gave robot target element that variable. Robot always (does not matter the size of table in that moment), clicks in the middle of table, not on the text which needs to be found.

Then, I went to fix my selector :slight_smile:
Yet again, went on an inspection with UI explorer and Indicate element, also on Visual tree I find and select all of SO ID’s and get this:

<wnd app='jp2launcher.exe' cls='SunAwtFrame' title='Manual Intervention' />
<java role='page tab list' />
<java name='Results' role='page tab' />
<java idx='2' role='table' />
<java role='label' tableCol='0' tableRow='5' />

and for each SO ID row value is different of course, so I tried with asterisk- tableRow=‘*’ />, but no luck, same result.

Tried to make it dynamic:

<java role='label' tableCol='0' tableRow='{{ROW}}' />

and gave variable ROW default value of “*” because I don’t know on which position is my text, but than Find text position fails.

anyone?