Analyze the webpage text

Hello! Can you please help me with my automation? I’m trying to create the following flow:

  1. Take a webpage link from an Excel file (there are 5 cells A1:A5, one link per cell)
  2. Open it in a browser
  3. Verify if a page is loading correctly (thinking to apply a logic If UiPath finds “This site can’t be reached” on the page, then it’s not loading correctly)
  4. If the page is loading correctly, write “Correct” next to the link in Excel (so B1:B5 cells). If not loading - write “Issue”.

Thank you very much in advance!

Hi @Artem_Samofalov

Welcome to forum

You can try this way

Use a assign activitiy to assign a integer variable counter to 1

counter = 1

Now use a while loop with condition as

counter<=5

Inside the loop.do the following actions

Use the read cell activitiy to read the particular cell “A”+counter.ToString
and store the result in generic datatype variable let’s say url

Now use open open browser activity to open that web page using url variable

Now use element exist to check whether the element exist or not ( you can use the element which appears when the webpage does not loaded) and store in varaible webpage_not_loaded

Now use an if condition with Condition as

webpage_not_loaded=False

If the condition is True ,

The use write cell activitiy to write in “B”+counter.ToString cell as “Correct”

Else if the condition is false

The use write cell activitiy to write in “B”+counter.ToString cell as "Issue "

After the if activitiy use the assign activitiy to increment the counter varaible

counter=counter+1

Close.the current browser

Regards

Nived N