Check URL for 404 errors in StudioX

Good afternoon

I have a spreadsheet with 700+ rows of web URLs which I need my bot to check each of them to see whether they produce a 404 error. If it produces an error, I would like it to type into a column that there is a 404 error, if not I would like it to leave the column blank and move to the next row.

I was hoping to just do a text search across the web page, but do not know how to do this… The look and text of 404 errors can vary from site to site.

Any help would be much appreciated. Thank you!


Use Element Exists activity and check 404 and Page Not found words exists in the page or not. If found update status as 404 error in the corresponding row else keep it as blank.

Note: Make the Selector dynamic for Element Exists activity and ignore title and some other unnecessary attributes.

Apologies for basic questions - I’m very new to using this! I am doing this in StudioX, not Studio - can I use Check App State instead of Element Exists? If so, how do I make it check whether 404 and Page Not found words exist on the page without indicating on the screen with an anchorable target?

@matt.edmonds Yes you can also use check App State instead of element exists . We have to indicate the element that we are looking for, then only the bot could identify it. Lets see up to what extent this error varies from window to window so that you can makes changes accordingly in the selector . Test with check App State with few inputs and see how it goes


I think it might be better to use HTTP Request activity if you can access the URLs without authorization. Can you try the following steps.

First, install UiPath.WebAPI.activities package via Mange Packages on ribbon menu.
Next, workflow will be as the following, for example.

Response status property of HTTP Request activity returns HTTP status code such as 404, 200 etc.



I think its better to go with the HTTP request as @Yoichi mentioned. Because it can work as a background automation and will be much fater.

Hello - this is really helpful, thank you!

Please can I check whether you set the Response status (ie “Response_status_from_HTTP_Request”) as an argument in the Data Manager? If so, please could you show me how you set it up as I am getting these errors:



Otherwise, how do I resolve the errors?

Thank you again!!


Can you try the following steps?

First, click +sign of Response status property.
Next click Create Variable as the following.


Note: The above steps are for StudioX CE 22.4.0.


Use HTTP Request. It’ll try to access the URL and gives you an output parameter for the Status Code (ie 400, etc)

Ah okay - I was able to create the variable by clicking the Save for Later Use option, which has the same logo as your Create Variable.

I get this runtime execution error when running the bot. What do I need to do to avoid this happening? Should I be configuring the activity in the Main panel? If so, what should I be putting…?

Thanks again


We need to set URL string from Excel in the property. The following sample will help you. (56.6 KB)


1 Like

Thank you so much - this has been really helpful!! So glad to have it working.

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