1

Using LogoImg.GetAttribute("src") I get the following scr:

https://scol.stage-next.sc.local/lspprofile/5a2e7338d6e9a927741175e2/image?id=5a2fbc98d6e9a9177c8c1592

But the real name of the file is: TestImage - 9fb0c49d-69b1-49ed-8c63-4283e405b781.jpg

If i enter the src in my browser i got the file with real name downloaded. How can I get the real name of the file in selenium as I need it for test.

Well the task is solved by other means, i just compared the differences in src. But the responce to the question would be yet interesting.

1 Answers1

0

As you are able to retrieve the src attribute as follows :

https://scol.stage-next.sc.local/lspprofile/5a2e7338d6e9a927741175e2/image?id=5a2fbc98d6e9a9177c8c1592

This is the reference to the resource stored in the Database. So it wouldn't be possible to retrive the name 9fb0c49d-69b1-49ed-8c63-4283e405b781.jpg before the file gets downloaded.

To ensure the download is completed and then to read the filename you will need to use either of the following :

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352