File uploads to website in Coded UI Test
A colleague of mine at work brought this to my attention, so I could share it on here:
After recording a test, I noticed that the test failed. I could trace the root cause of the issue to a file upload I did during the test. It seems like when selecting a file in a web application, you get “C:\fakepath” for the location of the file you selected.
In my case I had to upload a document from the local disk. When I replayed this action I got the c:\Fakepath folder instead.
This Fakepath comes from Internet Explorer and is a security feature which hides the real path selected path. The workaround to get the action recording up and running is to add the site to the trusted sites in the security tab of IE options.
Good info to know