Downloading PDF 404 not found but manually its works

Hi,
Im doing a sequence:

  • login in web page, searching IDs from Excel in this web page.
  • when I found the “link” to donwload PDF (maybe 2 links some cases), I do Scraping to get urls. in this case, the web page calls to Javascript function, the asnwer of scraping is “Javascript:load(5426523,10,0)” not an URL http.
  • With split function, i get 5426523 and create a url string. this url is like this (I changed values but the structure is the same, only change number between +):
    http://191.20.120.42:9000///pdf/asdasd5asdasdaxh155uihb1reh”+5426523+".pdf".

*And here, the situation starts, if I do this process manually, by me, I can see the new google chrome windows with de PDF inside But if I use the robot, this link opens a “404 not found file”. I compared both urls (manually and by robot) and its the same url.
I used HTTP Request to download it and same problem, a corrupted PDF and 404 status error.

If I open the pdf link manually and then run robot, robot found the file, but if robot read from excel an ID that i didnt open, robot found an 404 error windows and dowload a corrupted file.

I create another project, just to open a browser with “http://191.20.120.42:9000///pdf/asdasd5asdasdaxh155uihb1reh”+5426523+".pdf" pasted, and doesnt work. just works if I do, not the robot

Any Idea how to face this situation?

Hi @Pablo_Cifuentes,
Not sure if you doing the same mistake in the project but your adress should be written exactly like this:

http://191.20.120.42:9000///pdf/asdasd5asdasdaxh155uihb1reh” + “5426523” + “.pdf”

You are not doing equation by adding number to address but you doing string addition to an existing string.

2 Likes

Pablito,

Thanks for answered

I didnt understand. What do you mean? Or what I have to do with the string

I Just build this string adding number to assign (variable) and then I give it to http request to download.

I saw de “” in the number but, I sent this string to a log when the process Has finished. I copied, create new project, open browser, paste this link and, the same, 404 file not found. Then, If I logged in the web site, searched by Id and click to link, the pdf opened into a chrome windows with download option bottom.

After this, if I tried again execute “open browser” project, with the same url that I used in the first shot, it works, a new chrome windows with pdf. Not an 404 not file found

Please check carefully I think that you might miss some letter or sign.