Using Find Element Activity to Capture Text from the Top Left Corner of Different Websites

Hi everyone,

I am trying to use the Find Element activity to capture the details displayed on the top-left side when opening various websites. I am using the Find Element activity followed by the Get Attribute activity. However, since there are many different websites with varying and unique content, UiPath is not able to capture the details consistently.

Could anyone please guide me or suggest an alternative approach to achieve this?

Thank you in advance!

May i know the exact requirement. Are you trying to navigate tabs based on different keywords?

Thank you for replying.

I am creating an automation where the robot opens different websites. If there is an error on any of the websites, the robot will send me an email with the error details. In the email, I would also like the name of the website to be included.

I am using the Find Element activity to capture the name of the website, such as “Latest topics - UiPath community” in the screenshot I shared. I want this website name (e.g., “Latest topics - UiPath community”) to appear in the email.

@Aakash_Sharma4,

Follow this approach.

  1. Use Use Application/Browser activity Assign a variable to Output property

  2. Use Get Attribute activity and pass the output variable of Step 1 instead of indicating anything on screen.

  3. You will have the title of the window.

Final workflow should be look like this one.

1 Like

Thank you for replying.

I have many different URLs. When I enter the URL of the UiPath forum in the Chrome browser, it works fine. However, when the second URL (for example, Omron) is entered, the robot tries to open the UiPath forum again instead.

@Aakash_Sharma4,

Change the Browser URL to the variable which will be holding these URL.

I have saved all the URLs in an Excel file, but I am getting an error while creating a variable. Can you tell me what I should select for the variable type and scope when creating the variable?

@Aakash_Sharma4,

Please share how you are trying and what’s the error you are getting.

Hie @Aakash_Sharma4 so if your url is saved in Excel can you First read the excel and save their output in dt1 let’s say and the use for each row activity and inside this you can use open browser / Use browser so the data will iterate and bot will open all the browser that you store in excel.

cheers


I did these things in the begging so that UiPath can launch each URL. I thought I will be able to use the variable URL but it told me value of string cannot be converted to UiElement.

@Aakash_Sharma4,

The logic wise it should work. Have you done any changes into the properties of Use Application/Browser activity?

I have done everything you told me. Kindly check if I have made any mistakes, and if you’d like, I can share my main file.

@Aakash_Sharma4,

Don’t pass anything in Input Element. URL is fine in Input Application property.

Understood! However, after deleting the URL from the input element, the input application also disappeared, and now I am unsure where to enter the URL.

@Aakash_Sharma4,

Indicate any website, then pass the url and then modify the selector of Use appliaction browser to able to detect any website.

hie @Aakash_Sharma4 see yu have to pass in that way

o

cheers

Thank you for your help.

Now, I am facing another issue. While running the process, the robot has to click on several different buttons and check whether the page is blank or not, which I do using the ‘Element Exists’ activity.

After clicking all the buttons, it should click on the next link. However, after clicking each button, the process keeps reopening the URL and closing it. I used the toggle breakpoint and discovered that this is happening because we added the URL variable."

I am attaching the main file. Kindly check if I have made any mistake.

Main.xaml (58.7 KB)
Test.1.0.4.nupkg (2.8 MB)

Thank you for your reply and for helping me.

So your query has been resolved now ?

I’m still facing new issues because of the changes.