How to find and download excel file from web application


I want to check whether .xlsx attachment is there or not in web application and if it is available need to download it.

I am trying to use click activity but web application is not supporting for Selectors.

below is the screenshot for web application where I need to check.

And if I indicate that element for click it is indicating incorrect.

Below are the Selectors which occured after Indicate Element.


try to use get ocr text activity and you will get the text will be store in string variable now check in if condition variable.contains(“.xlsx”)

Hi Nilesh,

Use get text activity and indicate screen element, output will be excel file name, you can add String is null or empty condition if true use click activity.

Hello, thnx for reply.

Actually Element has not been indicating correctly to click on excel file link. I want to find the .xlsx file on web page and then need to click on that.

Currently I am able to find .xlsx file is there or not on web page but not able to click on that.



Hello Nilesh,
In this video, download files via an HTTP request.

I attached the VB.NET code:

Dim httpRequest As HttpWebRequest = DirectCast(WebRequest.Create(“https://url.pdf”), HttpWebRequest)
httpRequest.Method = WebRequestMethods.Http.Get
Dim httpResponse As HttpWebResponse = DirectCast(httpRequest.GetResponse(), HttpWebResponse)
Dim httpResponseStream As Stream = httpResponse.GetResponseStream()
Dim doc As Byte()
Dim ms As MemoryStream = New MemoryStream()
doc = ms.ToArray()
File.WriteAllBytes(“C:\yourfile.pdf”, doc)

Cristian Negulescu