String to Uipath.core.Uielement please help its bit urgent


#1

Hi Team,

Can any one tell how to convert the -String to Uipath.core.Uielement

Or Uipath.core.Genericvalue to Uipath.core.Uielement

I am taking the rows from the data table and sending them as element to the click activity
Please find screen shot


Assign activity has the code…
TBLrow =Convert.ToString(row(“Table_row”))


#2

Hi,

Are you sure the TBLRow has the right string for UiElement type?

If so you can do with UiElement constructor like this

new Uielement( new Selector("string"))

#3

Hi there @Sonika1,
I’m not entirely sure what you are trying to achieve.

What is inside your DataTable, a list of potential Selectors to click?

Alternatively, is it particular data to be clicked, such as ID 123151314?

Thanks in advance,
Josh


#4

@Mr_JDavey
yes its dynamic data to be clicked… and they are at different locations


#5

Hi there @Sonika1,
If it contains the specific data to be clicked on screen, you may want to consider Click Text, providing the Selector as the overarching application screen and text as TBLrow.ToString.

Thanks once again,
Josh


#6

@Sonika1

You can use find element before click activity and pass the string in Selector and in FoundElement you will get the UiElement

This is how you will convert String to UiElement.

and then By using Click activity pass that UiElement to the Elemet


#7

@Rashmi
Thats really really great job.

The UiPath is able to get the element and click on it… :slight_smile:

Thanks a lot.

Once it clicks on the element then it goes to next form there it clicks on the following arrow button…
one more Last thing there is another one click activity(i have made this also as a dynamic selector)
well it clicks on the Arrow button.
image
so the click has the following dynamic selector

“<wnd app=‘saplogon.exe’ cls=‘SAP_FRONTEND_SESSION’ title=‘Display =S= Standard Order “+Convert.ToString(row(“Sales document”))+”: Overview’ /><sap id=‘tbar[0]/btn[3]’ />”

same click without dynamic selector is

image
The value which is marked in black keeps changing dynamically( and this value is from "sales_document) column
Can you please help me with this.

Regards
Sonika


#8

Hi Rashmi,

No the problem is not resolved yet i just once again checked it with new data , if the cells are at bottom then its going and clicking on the start button…
Please see this…


NOTE: if the values are near by then its able to go n click on them.
I mean cell0 then cell10 or cell 15, or cell 17 if the values are at cell 30 the the above error is coming
The uipath workflow
image

Can u please help me.

Regards
Sonika


#9

So after every iteration you have to use “Down Arrow” downHotKey


#10

Hi Rashmi,

i did the same ,
image
Added “Down”
But still its behaving the same… :frowning:

Its going n hitting the “Type here to search” in the nemu ribbon…


its going out of the SAP application window