Find the element where i am

hello to all!
Problem:
i have a html page in which i need to type values in some elements.
i also have to do the same in some html pages like this one.
I have used Uipath Explorer to find the right combination of element to give me the same element in all html pages that i need.
i was not able to do so with Uipath Explorer, even using anchor element.
But in each html page i have a text ( in a element) that is imediatly before the one that i need.

What i have done:
In each html page, i go to that element ( those with the text that i know) which is a text element and always with the same value ( which i included in the selector);
I find that element, then send a hotKey ( tab) and after that i’m in the element that i need.
I can then ( always with hotKey activity) send the value that i want for that element.

Problem that i think that can appear:
As i do not know the element in which i am when using sendhotKey activity i cannot indicate the element. i’m afraid that in some circunstances, those Keys will be consumed in other places… ( which i suspect because sometimes i have messages that do not belong to that html page…)

Possible solution:
With a activity like EWhoAmI ( something like that) that would be equivalent to Uipath explorer i would get the right tags to pass to the sendKeys activity.
Is it possible?
thank you to all.

1 Like

Hey @Antonio_Campos1

So basically you want to find element in a html page with label and do action on the corresponding input near to it is that correct ?

Thanks
#nK

thank you for your super fast response…
i will try to show with that image in which at left i have always those text ( 1per, 2per and 3 per). these are text elements. in the right, i have those % that i need to modify each time i am in that page. So i find the text element ( say 1per) then sendKey Tab and after i’m in the element which i want to modify with another sendKey with say 100. As i said, 1per ou 2per or 3per are not labels but text elements that in the past have been filled with those values.
I must say that the process is working but i think that i can have “wild keys” travelling anywhere… just because i’m not able to use sendKeys with a element but just sendkey. i think that in generaly it’s ok but i am not sure for all if for some reason something fail before sending keys… ( internet response, …)
Thank you sir.

1 Like

what you’ve wrote it’s also ok. that is:i must locate a element ( for exemple 1per) then do action on the corresponding input near to it ( element %) but i’m not able to get a set of tags to work with all pages that i need to modify…

1 Like

Okay clear, since you said the text element is filled always. The same can be still identified by Find Element activity with text or value attribute mentioned as 1per or other.

This way looks a bit reliable for me over send hotkey method.

As Send Hotkey method doesn’t guarantee us the outcome.

Thanks
#nK

hello to all.
well, about a solution … i have not yet…
what i’ve done:

  • searched and find that js can be injected and so i have create a simple js script that would tell me with the help of activeElement ( as the name say) something that i would return and then use it in a type ou click activity… however i founded that i had nothing to use ( which i found strange!!). anyway will it be usefull somewhere in the future as with js i can even put data in elements in a html!
  • so still not heaving what i need what to do next…
    i digged a little more around anchor ( with i had used in uiexplorer) with not so good results, but i have found that there are an activity whose name is Anchor base that had always give good results in whatever class i was and also with whatever classification parameter in that class. To not forget those anchor base!!!
    so i really does not have a solution to my question - where i am but anyway i have done it in another way…
    thanks to all.

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