Any Alternative UiPath Techniques for Extracting Selectors in Website elements into Excel Without Standard UI Elements Targeting"

Hi,

I have Input Excel file, where the first column titled ‘Fields’ lists specific data : (Example):Company, Occupation, and Height. Query is to create a bot in UiPath that can read these fields, access the data from https://www.fakenamegenerator.com/, and fill the corresponding selectors in the second column of my Excel file, named ‘Selectors’.

However, I am constrained from using UiPath’s conventional targeting methods such as ‘Find Element’, ‘Find Children’, ‘Get Text’, and ‘AI Computer Vision’. I am seeking alternative methods that could be used within UiPath for this purpose. Particularly,

  1. The feasibility of integrating UiPath with JavaScript or Selenium for web data extraction through the injection of JS scripts or any.
  2. The potential application of Machine Learning models for identifying and extracting web elements without standard UI targeting.

Could anyone provide insight into these approaches ?

Thank you
inputfile

The alternative using jQuery is as follows:

$('#details .dl-horizontal dt:contains("Company")').next('dd').text()

This jQuery code selects an element with the following characteristics:

  • It is a <dt> element.
  • It contains the text “Company”.
  • It is a descendant of an element with the ID “details”.
  • It has a class “dl-horizontal”.

Once this <dt> element is found, .next('dd') selects the immediate next sibling element that is a <dd> element. Finally, .text() retrieves the text content of the selected <dd> element.

So, overall, this code retrieves the text content of the <dd> element that immediately follows a <dt> element containing the text “Company” within the element with the ID “details” and the class “dl-horizontal”.

To obtain other data, you can simply change the text “Company” to another value, such as “Occupation”, like this:

1 Like